/** @param socketFile to connect to when creating a Thrift client. */ ReconnectingEdenClient(final Path socketFile, Clock clock) { this( () -> { // Creates a new EdenService.Client by creating a new connection via the socketFile. UnixDomainSocket socket = UnixDomainSocket.createSocketWithPath(socketFile); TTransport transport = new TSocket(socket); // No need to invoke transport.open() because the UnixDomainSocket is already connected. TProtocol protocol = new TBinaryProtocol(transport); return new EdenService.Client(protocol); }, clock); }