test_class.declarator: topicName = "test"
test_class.modifier: private
test_class.original_string: private String topicName = "test";
test_class.type: String
test_class.var_name: topicName
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: client = new MockClient(time)
test_class.modifier: private
test_class.original_string: private MockClient client = new MockClient(time);
test_class.type: MockClient
test_class.var_name: client
test_class.declarator: cluster = TestUtils.singletonCluster(topicName, 1)
test_class.modifier: private
test_class.original_string: private Cluster cluster = TestUtils.singletonCluster(topicName, 1);
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: 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: consumerClient = new ConsumerNetworkClient(client, metadata, time, 100, 1000)
test_class.modifier: private
test_class.original_string: private ConsumerNetworkClient consumerClient = new ConsumerNetworkClient(client, metadata, time, 100, 1000);
test_class.type: ConsumerNetworkClient
test_class.var_name: consumerClient
test_class.file: clients/src/test/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClientTest.java
test_class.identifier: ConsumerNetworkClientTest
test_case.body: @Test
      public void schedule() {
          TestDelayedTask task = new TestDelayedTask();
          consumerClient.schedule(task, time.milliseconds());
          consumerClient.poll(0);
          assertEquals(1, task.executions);
  
          consumerClient.schedule(task, time.milliseconds() + 100);
          consumerClient.poll(0);
          assertEquals(1, task.executions);
  
          time.sleep(100);
          consumerClient.poll(0);
          assertEquals(2, task.executions);
      }
test_case.class_method_signature: ConsumerNetworkClientTest.schedule()
test_case.full_signature: @Test public void schedule()
test_case.identifier: schedule
test_case.invocations: schedule milliseconds poll assertEquals schedule milliseconds poll assertEquals sleep poll assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void schedule()
focal_class.declarator: log = LoggerFactory.getLogger(ConsumerNetworkClient.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(ConsumerNetworkClient.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: client
focal_class.modifier: private final
focal_class.original_string: private final KafkaClient client;
focal_class.type: KafkaClient
focal_class.var_name: client
focal_class.declarator: delayedTasks = new DelayedTaskQueue()
focal_class.modifier: private final
focal_class.original_string: private final DelayedTaskQueue delayedTasks = new DelayedTaskQueue();
focal_class.type: DelayedTaskQueue
focal_class.var_name: delayedTasks
focal_class.declarator: unsent = new HashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<Node, List<ClientRequest>> unsent = new HashMap<>();
focal_class.type: Map<Node, List<ClientRequest>>
focal_class.var_name: unsent
focal_class.declarator: unsentExpiryMs
focal_class.modifier: private final
focal_class.original_string: private final long unsentExpiryMs;
focal_class.type: long
focal_class.var_name: unsentExpiryMs
focal_class.declarator: wakeup = new AtomicBoolean(false)
focal_class.modifier: private final
focal_class.original_string: private final AtomicBoolean wakeup = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: wakeup
focal_class.declarator: wakeupDisabledCount = 0
focal_class.modifier: private
focal_class.original_string: private int wakeupDisabledCount = 0;
focal_class.type: int
focal_class.var_name: wakeupDisabledCount
focal_class.declarator: retryBackoffMs
focal_class.modifier: private final
focal_class.original_string: private final long retryBackoffMs;
focal_class.type: long
focal_class.var_name: retryBackoffMs
focal_class.declarator: metadata
focal_class.modifier: private final
focal_class.original_string: private final Metadata metadata;
focal_class.type: Metadata
focal_class.var_name: metadata
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/consumer/internals/ConsumerNetworkClient.java
focal_class.identifier: ConsumerNetworkClient
focal_class.interfaces: implements Closeable
focal_class.class_method_signature: ConsumerNetworkClient.ConsumerNetworkClient(KafkaClient client,
          Metadata metadata,
          Time time,
          long retryBackoffMs,
          long requestTimeoutMs)
focal_class.full_signature: public  ConsumerNetworkClient(KafkaClient client,
          Metadata metadata,
          Time time,
          long retryBackoffMs,
          long requestTimeoutMs)
focal_class.identifier: ConsumerNetworkClient
focal_class.modifiers: public
focal_class.parameters: (KafkaClient client,
          Metadata metadata,
          Time time,
          long retryBackoffMs,
          long requestTimeoutMs)
focal_class.signature:  ConsumerNetworkClient(KafkaClient client,
          Metadata metadata,
          Time time,
          long retryBackoffMs,
          long requestTimeoutMs)
focal_class.class_method_signature: ConsumerNetworkClient.schedule(DelayedTask task, long at)
focal_class.full_signature: public void schedule(DelayedTask task, long at)
focal_class.identifier: schedule
focal_class.modifiers: public
focal_class.parameters: (DelayedTask task, long at)
focal_class.return: void
focal_class.signature: void schedule(DelayedTask task, long at)
focal_class.class_method_signature: ConsumerNetworkClient.unschedule(DelayedTask task)
focal_class.full_signature: public void unschedule(DelayedTask task)
focal_class.identifier: unschedule
focal_class.modifiers: public
focal_class.parameters: (DelayedTask task)
focal_class.return: void
focal_class.signature: void unschedule(DelayedTask task)
focal_class.class_method_signature: ConsumerNetworkClient.send(Node node,
          ApiKeys api,
          AbstractRequest request)
focal_class.full_signature: public RequestFuture<ClientResponse> send(Node node,
          ApiKeys api,
          AbstractRequest request)
focal_class.identifier: send
focal_class.modifiers: public
focal_class.parameters: (Node node,
          ApiKeys api,
          AbstractRequest request)
focal_class.return: RequestFuture<ClientResponse>
focal_class.signature: RequestFuture<ClientResponse> send(Node node,
          ApiKeys api,
          AbstractRequest request)
focal_class.class_method_signature: ConsumerNetworkClient.put(Node node, ClientRequest request)
focal_class.full_signature: private void put(Node node, ClientRequest request)
focal_class.identifier: put
focal_class.modifiers: private
focal_class.parameters: (Node node, ClientRequest request)
focal_class.return: void
focal_class.signature: void put(Node node, ClientRequest request)
focal_class.class_method_signature: ConsumerNetworkClient.leastLoadedNode()
focal_class.full_signature: public Node leastLoadedNode()
focal_class.identifier: leastLoadedNode
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Node
focal_class.signature: Node leastLoadedNode()
focal_class.class_method_signature: ConsumerNetworkClient.awaitMetadataUpdate()
focal_class.full_signature: public void awaitMetadataUpdate()
focal_class.identifier: awaitMetadataUpdate
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void awaitMetadataUpdate()
focal_class.class_method_signature: ConsumerNetworkClient.wakeup()
focal_class.full_signature: public void wakeup()
focal_class.identifier: wakeup
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void wakeup()
focal_class.class_method_signature: ConsumerNetworkClient.ensureFreshMetadata()
focal_class.full_signature: public void ensureFreshMetadata()
focal_class.identifier: ensureFreshMetadata
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void ensureFreshMetadata()
focal_class.class_method_signature: ConsumerNetworkClient.poll(RequestFuture<?> future)
focal_class.full_signature: public void poll(RequestFuture<?> future)
focal_class.identifier: poll
focal_class.modifiers: public
focal_class.parameters: (RequestFuture<?> future)
focal_class.return: void
focal_class.signature: void poll(RequestFuture<?> future)
focal_class.class_method_signature: ConsumerNetworkClient.poll(RequestFuture<?> future, long timeout)
focal_class.full_signature: public boolean poll(RequestFuture<?> future, long timeout)
focal_class.identifier: poll
focal_class.modifiers: public
focal_class.parameters: (RequestFuture<?> future, long timeout)
focal_class.return: boolean
focal_class.signature: boolean poll(RequestFuture<?> future, long timeout)
focal_class.class_method_signature: ConsumerNetworkClient.poll(long timeout)
focal_class.full_signature: public void poll(long timeout)
focal_class.identifier: poll
focal_class.modifiers: public
focal_class.parameters: (long timeout)
focal_class.return: void
focal_class.signature: void poll(long timeout)
focal_class.class_method_signature: ConsumerNetworkClient.poll(long timeout, long now)
focal_class.full_signature: public void poll(long timeout, long now)
focal_class.identifier: poll
focal_class.modifiers: public
focal_class.parameters: (long timeout, long now)
focal_class.return: void
focal_class.signature: void poll(long timeout, long now)
focal_class.class_method_signature: ConsumerNetworkClient.pollNoWakeup()
focal_class.full_signature: public void pollNoWakeup()
focal_class.identifier: pollNoWakeup
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void pollNoWakeup()
focal_class.class_method_signature: ConsumerNetworkClient.poll(long timeout, long now, boolean executeDelayedTasks)
focal_class.full_signature: private void poll(long timeout, long now, boolean executeDelayedTasks)
focal_class.identifier: poll
focal_class.modifiers: private
focal_class.parameters: (long timeout, long now, boolean executeDelayedTasks)
focal_class.return: void
focal_class.signature: void poll(long timeout, long now, boolean executeDelayedTasks)
focal_class.class_method_signature: ConsumerNetworkClient.executeDelayedTasks(long now)
focal_class.full_signature: public void executeDelayedTasks(long now)
focal_class.identifier: executeDelayedTasks
focal_class.modifiers: public
focal_class.parameters: (long now)
focal_class.return: void
focal_class.signature: void executeDelayedTasks(long now)
focal_class.class_method_signature: ConsumerNetworkClient.awaitPendingRequests(Node node)
focal_class.full_signature: public void awaitPendingRequests(Node node)
focal_class.identifier: awaitPendingRequests
focal_class.modifiers: public
focal_class.parameters: (Node node)
focal_class.return: void
focal_class.signature: void awaitPendingRequests(Node node)
focal_class.class_method_signature: ConsumerNetworkClient.pendingRequestCount(Node node)
focal_class.full_signature: public int pendingRequestCount(Node node)
focal_class.identifier: pendingRequestCount
focal_class.modifiers: public
focal_class.parameters: (Node node)
focal_class.return: int
focal_class.signature: int pendingRequestCount(Node node)
focal_class.class_method_signature: ConsumerNetworkClient.pendingRequestCount()
focal_class.full_signature: public int pendingRequestCount()
focal_class.identifier: pendingRequestCount
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int pendingRequestCount()
focal_class.class_method_signature: ConsumerNetworkClient.checkDisconnects(long now)
focal_class.full_signature: private void checkDisconnects(long now)
focal_class.identifier: checkDisconnects
focal_class.modifiers: private
focal_class.parameters: (long now)
focal_class.return: void
focal_class.signature: void checkDisconnects(long now)
focal_class.class_method_signature: ConsumerNetworkClient.failExpiredRequests(long now)
focal_class.full_signature: private void failExpiredRequests(long now)
focal_class.identifier: failExpiredRequests
focal_class.modifiers: private
focal_class.parameters: (long now)
focal_class.return: void
focal_class.signature: void failExpiredRequests(long now)
focal_class.class_method_signature: ConsumerNetworkClient.failUnsentRequests(Node node, RuntimeException e)
focal_class.full_signature: protected void failUnsentRequests(Node node, RuntimeException e)
focal_class.identifier: failUnsentRequests
focal_class.modifiers: protected
focal_class.parameters: (Node node, RuntimeException e)
focal_class.return: void
focal_class.signature: void failUnsentRequests(Node node, RuntimeException e)
focal_class.class_method_signature: ConsumerNetworkClient.trySend(long now)
focal_class.full_signature: private boolean trySend(long now)
focal_class.identifier: trySend
focal_class.modifiers: private
focal_class.parameters: (long now)
focal_class.return: boolean
focal_class.signature: boolean trySend(long now)
focal_class.class_method_signature: ConsumerNetworkClient.clientPoll(long timeout, long now)
focal_class.full_signature: private void clientPoll(long timeout, long now)
focal_class.identifier: clientPoll
focal_class.modifiers: private
focal_class.parameters: (long timeout, long now)
focal_class.return: void
focal_class.signature: void clientPoll(long timeout, long now)
focal_class.class_method_signature: ConsumerNetworkClient.maybeTriggerWakeup()
focal_class.full_signature: private void maybeTriggerWakeup()
focal_class.identifier: maybeTriggerWakeup
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void maybeTriggerWakeup()
focal_class.class_method_signature: ConsumerNetworkClient.disableWakeups()
focal_class.full_signature: public void disableWakeups()
focal_class.identifier: disableWakeups
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void disableWakeups()
focal_class.class_method_signature: ConsumerNetworkClient.enableWakeups()
focal_class.full_signature: public void enableWakeups()
focal_class.identifier: enableWakeups
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void enableWakeups()
focal_class.class_method_signature: ConsumerNetworkClient.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: ConsumerNetworkClient.connectionFailed(Node node)
focal_class.full_signature: public boolean connectionFailed(Node node)
focal_class.identifier: connectionFailed
focal_class.modifiers: public
focal_class.parameters: (Node node)
focal_class.return: boolean
focal_class.signature: boolean connectionFailed(Node node)
focal_class.class_method_signature: ConsumerNetworkClient.tryConnect(Node node)
focal_class.full_signature: public void tryConnect(Node node)
focal_class.identifier: tryConnect
focal_class.modifiers: public
focal_class.parameters: (Node node)
focal_class.return: void
focal_class.signature: void tryConnect(Node node)
focal_method.body: public void schedule(DelayedTask task, long at) {
          delayedTasks.add(task, at);
      }
focal_method.class_method_signature: ConsumerNetworkClient.schedule(DelayedTask task, long at)
focal_method.full_signature: public void schedule(DelayedTask task, long at)
focal_method.identifier: schedule
focal_method.invocations: add
focal_method.modifiers: public
focal_method.parameters: (DelayedTask task, long at)
focal_method.return: void
focal_method.signature: void schedule(DelayedTask task, long at)