test_class.declarator: requestTimeoutMs = 1000
test_class.modifier: private final
test_class.original_string: private final int requestTimeoutMs = 1000;
test_class.type: int
test_class.var_name: requestTimeoutMs
test_class.declarator: time = new MockTime()
test_class.modifier: private
test_class.original_string: private MockTime time = new MockTime();
test_class.type: MockTime
test_class.var_name: time
test_class.declarator: selector = new MockSelector(time)
test_class.modifier: private
test_class.original_string: private MockSelector selector = new MockSelector(time);
test_class.type: MockSelector
test_class.var_name: selector
test_class.declarator: metadata = new Metadata(0, Long.MAX_VALUE)
test_class.modifier: private
test_class.original_string: private Metadata metadata = new Metadata(0, Long.MAX_VALUE);
test_class.type: Metadata
test_class.var_name: metadata
test_class.declarator: nodeId = 1
test_class.modifier: private
test_class.original_string: private int nodeId = 1;
test_class.type: int
test_class.var_name: nodeId
test_class.declarator: cluster = TestUtils.singletonCluster("test", nodeId)
test_class.modifier: private
test_class.original_string: private Cluster cluster = TestUtils.singletonCluster("test", nodeId);
test_class.type: Cluster
test_class.var_name: cluster
test_class.declarator: node = cluster.nodes().get(0)
test_class.modifier: private
test_class.original_string: private Node node = cluster.nodes().get(0);
test_class.type: Node
test_class.var_name: node
test_class.declarator: reconnectBackoffMsTest = 10 * 1000
test_class.modifier: private
test_class.original_string: private long reconnectBackoffMsTest = 10 * 1000;
test_class.type: long
test_class.var_name: reconnectBackoffMsTest
test_class.declarator: client = new NetworkClient(selector, metadata, "mock", Integer.MAX_VALUE, reconnectBackoffMsTest, 
              64 * 1024, 64 * 1024, requestTimeoutMs, time)
test_class.modifier: private
test_class.original_string: private NetworkClient client = new NetworkClient(selector, metadata, "mock", Integer.MAX_VALUE, reconnectBackoffMsTest, 
              64 * 1024, 64 * 1024, requestTimeoutMs, time);
test_class.type: NetworkClient
test_class.var_name: client
test_class.declarator: clientWithStaticNodes = new NetworkClient(selector, new ManualMetadataUpdater(Arrays.asList(node)),
              "mock-static", Integer.MAX_VALUE, 0, 64 * 1024, 64 * 1024, requestTimeoutMs, time)
test_class.modifier: private
test_class.original_string: private NetworkClient clientWithStaticNodes = new NetworkClient(selector, new ManualMetadataUpdater(Arrays.asList(node)),
              "mock-static", Integer.MAX_VALUE, 0, 64 * 1024, 64 * 1024, requestTimeoutMs, time);
test_class.type: NetworkClient
test_class.var_name: clientWithStaticNodes
test_class.file: clients/src/test/java/org/apache/kafka/clients/NetworkClientTest.java
test_class.identifier: NetworkClientTest
test_case.body: @Test
      public void testConnectionDelayConnected() {
          awaitReady(client, node);
  
          long now = time.milliseconds();
          long delay = client.connectionDelay(node, now);
  
          assertEquals(Long.MAX_VALUE, delay);
      }
test_case.class_method_signature: NetworkClientTest.testConnectionDelayConnected()
test_case.full_signature: @Test public void testConnectionDelayConnected()
test_case.identifier: testConnectionDelayConnected
test_case.invocations: awaitReady milliseconds connectionDelay assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testConnectionDelayConnected()
focal_class.declarator: log = LoggerFactory.getLogger(NetworkClient.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(NetworkClient.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: selector
focal_class.modifier: private final
focal_class.original_string: private final Selectable selector;
focal_class.type: Selectable
focal_class.var_name: selector
focal_class.declarator: metadataUpdater
focal_class.modifier: private final
focal_class.original_string: private final MetadataUpdater metadataUpdater;
focal_class.type: MetadataUpdater
focal_class.var_name: metadataUpdater
focal_class.declarator: randOffset
focal_class.modifier: private final
focal_class.original_string: private final Random randOffset;
focal_class.type: Random
focal_class.var_name: randOffset
focal_class.declarator: connectionStates
focal_class.modifier: private final
focal_class.original_string: private final ClusterConnectionStates connectionStates;
focal_class.type: ClusterConnectionStates
focal_class.var_name: connectionStates
focal_class.declarator: inFlightRequests
focal_class.modifier: private final
focal_class.original_string: private final InFlightRequests inFlightRequests;
focal_class.type: InFlightRequests
focal_class.var_name: inFlightRequests
focal_class.declarator: socketSendBuffer
focal_class.modifier: private final
focal_class.original_string: private final int socketSendBuffer;
focal_class.type: int
focal_class.var_name: socketSendBuffer
focal_class.declarator: socketReceiveBuffer
focal_class.modifier: private final
focal_class.original_string: private final int socketReceiveBuffer;
focal_class.type: int
focal_class.var_name: socketReceiveBuffer
focal_class.declarator: clientId
focal_class.modifier: private final
focal_class.original_string: private final String clientId;
focal_class.type: String
focal_class.var_name: clientId
focal_class.declarator: correlation
focal_class.modifier: private
focal_class.original_string: private int correlation;
focal_class.type: int
focal_class.var_name: correlation
focal_class.declarator: requestTimeoutMs
focal_class.modifier: private final
focal_class.original_string: private final int requestTimeoutMs;
focal_class.type: int
focal_class.var_name: requestTimeoutMs
focal_class.declarator: time
focal_class.modifier: private final
focal_class.original_string: private final Time time;
focal_class.type: Time
focal_class.var_name: time
focal_class.file: clients/src/main/java/org/apache/kafka/clients/NetworkClient.java
focal_class.identifier: NetworkClient
focal_class.interfaces: implements KafkaClient
focal_class.class_method_signature: NetworkClient.NetworkClient(Selectable selector,
          Metadata metadata,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.full_signature: public  NetworkClient(Selectable selector,
          Metadata metadata,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.identifier: NetworkClient
focal_class.modifiers: public
focal_class.parameters: (Selectable selector,
          Metadata metadata,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.signature:  NetworkClient(Selectable selector,
          Metadata metadata,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.class_method_signature: NetworkClient.NetworkClient(Selectable selector,
          MetadataUpdater metadataUpdater,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.full_signature: public  NetworkClient(Selectable selector,
          MetadataUpdater metadataUpdater,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.identifier: NetworkClient
focal_class.modifiers: public
focal_class.parameters: (Selectable selector,
          MetadataUpdater metadataUpdater,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.signature:  NetworkClient(Selectable selector,
          MetadataUpdater metadataUpdater,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.class_method_signature: NetworkClient.NetworkClient(MetadataUpdater metadataUpdater,
          Metadata metadata,
          Selectable selector,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.full_signature: private  NetworkClient(MetadataUpdater metadataUpdater,
          Metadata metadata,
          Selectable selector,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.identifier: NetworkClient
focal_class.modifiers: private
focal_class.parameters: (MetadataUpdater metadataUpdater,
          Metadata metadata,
          Selectable selector,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.signature:  NetworkClient(MetadataUpdater metadataUpdater,
          Metadata metadata,
          Selectable selector,
          String clientId,
          int maxInFlightRequestsPerConnection,
          long reconnectBackoffMs,
          int socketSendBuffer,
          int socketReceiveBuffer,
          int requestTimeoutMs,
          Time time)
focal_class.class_method_signature: NetworkClient.ready(Node node, long now)
focal_class.full_signature: @Override public boolean ready(Node node, long now)
focal_class.identifier: ready
focal_class.modifiers: @Override public
focal_class.parameters: (Node node, long now)
focal_class.return: boolean
focal_class.signature: boolean ready(Node node, long now)
focal_class.class_method_signature: NetworkClient.close(String nodeId)
focal_class.full_signature: @Override public void close(String nodeId)
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: (String nodeId)
focal_class.return: void
focal_class.signature: void close(String nodeId)
focal_class.class_method_signature: NetworkClient.connectionDelay(Node node, long now)
focal_class.full_signature: @Override public long connectionDelay(Node node, long now)
focal_class.identifier: connectionDelay
focal_class.modifiers: @Override public
focal_class.parameters: (Node node, long now)
focal_class.return: long
focal_class.signature: long connectionDelay(Node node, long now)
focal_class.class_method_signature: NetworkClient.connectionFailed(Node node)
focal_class.full_signature: @Override public boolean connectionFailed(Node node)
focal_class.identifier: connectionFailed
focal_class.modifiers: @Override public
focal_class.parameters: (Node node)
focal_class.return: boolean
focal_class.signature: boolean connectionFailed(Node node)
focal_class.class_method_signature: NetworkClient.isReady(Node node, long now)
focal_class.full_signature: @Override public boolean isReady(Node node, long now)
focal_class.identifier: isReady
focal_class.modifiers: @Override public
focal_class.parameters: (Node node, long now)
focal_class.return: boolean
focal_class.signature: boolean isReady(Node node, long now)
focal_class.class_method_signature: NetworkClient.canSendRequest(String node)
focal_class.full_signature: private boolean canSendRequest(String node)
focal_class.identifier: canSendRequest
focal_class.modifiers: private
focal_class.parameters: (String node)
focal_class.return: boolean
focal_class.signature: boolean canSendRequest(String node)
focal_class.class_method_signature: NetworkClient.send(ClientRequest request, long now)
focal_class.full_signature: @Override public void send(ClientRequest request, long now)
focal_class.identifier: send
focal_class.modifiers: @Override public
focal_class.parameters: (ClientRequest request, long now)
focal_class.return: void
focal_class.signature: void send(ClientRequest request, long now)
focal_class.class_method_signature: NetworkClient.doSend(ClientRequest request, long now)
focal_class.full_signature: private void doSend(ClientRequest request, long now)
focal_class.identifier: doSend
focal_class.modifiers: private
focal_class.parameters: (ClientRequest request, long now)
focal_class.return: void
focal_class.signature: void doSend(ClientRequest request, long now)
focal_class.class_method_signature: NetworkClient.poll(long timeout, long now)
focal_class.full_signature: @Override public List<ClientResponse> poll(long timeout, long now)
focal_class.identifier: poll
focal_class.modifiers: @Override public
focal_class.parameters: (long timeout, long now)
focal_class.return: List<ClientResponse>
focal_class.signature: List<ClientResponse> poll(long timeout, long now)
focal_class.class_method_signature: NetworkClient.inFlightRequestCount()
focal_class.full_signature: @Override public int inFlightRequestCount()
focal_class.identifier: inFlightRequestCount
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int inFlightRequestCount()
focal_class.class_method_signature: NetworkClient.inFlightRequestCount(String node)
focal_class.full_signature: @Override public int inFlightRequestCount(String node)
focal_class.identifier: inFlightRequestCount
focal_class.modifiers: @Override public
focal_class.parameters: (String node)
focal_class.return: int
focal_class.signature: int inFlightRequestCount(String node)
focal_class.class_method_signature: NetworkClient.nextRequestHeader(ApiKeys key)
focal_class.full_signature: @Override public RequestHeader nextRequestHeader(ApiKeys key)
focal_class.identifier: nextRequestHeader
focal_class.modifiers: @Override public
focal_class.parameters: (ApiKeys key)
focal_class.return: RequestHeader
focal_class.signature: RequestHeader nextRequestHeader(ApiKeys key)
focal_class.class_method_signature: NetworkClient.nextRequestHeader(ApiKeys key, short version)
focal_class.full_signature: @Override public RequestHeader nextRequestHeader(ApiKeys key, short version)
focal_class.identifier: nextRequestHeader
focal_class.modifiers: @Override public
focal_class.parameters: (ApiKeys key, short version)
focal_class.return: RequestHeader
focal_class.signature: RequestHeader nextRequestHeader(ApiKeys key, short version)
focal_class.class_method_signature: NetworkClient.wakeup()
focal_class.full_signature: @Override public void wakeup()
focal_class.identifier: wakeup
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void wakeup()
focal_class.class_method_signature: NetworkClient.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: NetworkClient.leastLoadedNode(long now)
focal_class.full_signature: @Override public Node leastLoadedNode(long now)
focal_class.identifier: leastLoadedNode
focal_class.modifiers: @Override public
focal_class.parameters: (long now)
focal_class.return: Node
focal_class.signature: Node leastLoadedNode(long now)
focal_class.class_method_signature: NetworkClient.parseResponse(ByteBuffer responseBuffer, RequestHeader requestHeader)
focal_class.full_signature: public static Struct parseResponse(ByteBuffer responseBuffer, RequestHeader requestHeader)
focal_class.identifier: parseResponse
focal_class.modifiers: public static
focal_class.parameters: (ByteBuffer responseBuffer, RequestHeader requestHeader)
focal_class.return: Struct
focal_class.signature: Struct parseResponse(ByteBuffer responseBuffer, RequestHeader requestHeader)
focal_class.class_method_signature: NetworkClient.processDisconnection(List<ClientResponse> responses, String nodeId, long now)
focal_class.full_signature: private void processDisconnection(List<ClientResponse> responses, String nodeId, long now)
focal_class.identifier: processDisconnection
focal_class.modifiers: private
focal_class.parameters: (List<ClientResponse> responses, String nodeId, long now)
focal_class.return: void
focal_class.signature: void processDisconnection(List<ClientResponse> responses, String nodeId, long now)
focal_class.class_method_signature: NetworkClient.handleTimedOutRequests(List<ClientResponse> responses, long now)
focal_class.full_signature: private void handleTimedOutRequests(List<ClientResponse> responses, long now)
focal_class.identifier: handleTimedOutRequests
focal_class.modifiers: private
focal_class.parameters: (List<ClientResponse> responses, long now)
focal_class.return: void
focal_class.signature: void handleTimedOutRequests(List<ClientResponse> responses, long now)
focal_class.class_method_signature: NetworkClient.handleCompletedSends(List<ClientResponse> responses, long now)
focal_class.full_signature: private void handleCompletedSends(List<ClientResponse> responses, long now)
focal_class.identifier: handleCompletedSends
focal_class.modifiers: private
focal_class.parameters: (List<ClientResponse> responses, long now)
focal_class.return: void
focal_class.signature: void handleCompletedSends(List<ClientResponse> responses, long now)
focal_class.class_method_signature: NetworkClient.handleCompletedReceives(List<ClientResponse> responses, long now)
focal_class.full_signature: private void handleCompletedReceives(List<ClientResponse> responses, long now)
focal_class.identifier: handleCompletedReceives
focal_class.modifiers: private
focal_class.parameters: (List<ClientResponse> responses, long now)
focal_class.return: void
focal_class.signature: void handleCompletedReceives(List<ClientResponse> responses, long now)
focal_class.class_method_signature: NetworkClient.handleDisconnections(List<ClientResponse> responses, long now)
focal_class.full_signature: private void handleDisconnections(List<ClientResponse> responses, long now)
focal_class.identifier: handleDisconnections
focal_class.modifiers: private
focal_class.parameters: (List<ClientResponse> responses, long now)
focal_class.return: void
focal_class.signature: void handleDisconnections(List<ClientResponse> responses, long now)
focal_class.class_method_signature: NetworkClient.handleConnections()
focal_class.full_signature: private void handleConnections()
focal_class.identifier: handleConnections
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void handleConnections()
focal_class.class_method_signature: NetworkClient.correlate(RequestHeader requestHeader, ResponseHeader responseHeader)
focal_class.full_signature: private static void correlate(RequestHeader requestHeader, ResponseHeader responseHeader)
focal_class.identifier: correlate
focal_class.modifiers: private static
focal_class.parameters: (RequestHeader requestHeader, ResponseHeader responseHeader)
focal_class.return: void
focal_class.signature: void correlate(RequestHeader requestHeader, ResponseHeader responseHeader)
focal_class.class_method_signature: NetworkClient.initiateConnect(Node node, long now)
focal_class.full_signature: private void initiateConnect(Node node, long now)
focal_class.identifier: initiateConnect
focal_class.modifiers: private
focal_class.parameters: (Node node, long now)
focal_class.return: void
focal_class.signature: void initiateConnect(Node node, long now)
focal_method.body: @Override
      public long connectionDelay(Node node, long now) {
          return connectionStates.connectionDelay(node.idString(), now);
      }
focal_method.class_method_signature: NetworkClient.connectionDelay(Node node, long now)
focal_method.full_signature: @Override public long connectionDelay(Node node, long now)
focal_method.identifier: connectionDelay
focal_method.invocations: connectionDelay idString
focal_method.modifiers: @Override public
focal_method.parameters: (Node node, long now)
focal_method.return: long
focal_method.signature: long connectionDelay(Node node, long now)