@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); }
public void schedule(DelayedTask task, long at) { delayedTasks.add(task, at); }
ConsumerNetworkClient implements Closeable { public void schedule(DelayedTask task, long at) { delayedTasks.add(task, at); } }
ConsumerNetworkClient implements Closeable { public void schedule(DelayedTask task, long at) { delayedTasks.add(task, at); } ConsumerNetworkClient(KafkaClient client,
        Metadata metadata,
        Time time,
        long retryBackoffMs,
        long requestTimeoutMs); }
ConsumerNetworkClient implements Closeable { public void schedule(DelayedTask task, long at) { delayedTasks.add(task, at); } ConsumerNetworkClient(KafkaClient client,
        Metadata metadata,
        Time time,
        long retryBackoffMs,
        long requestTimeoutMs); void schedule(DelayedTask task, long at); void unschedule(DelayedTask task); RequestFuture<ClientResponse> send(Node node,
        ApiKeys api,
        AbstractRequest request); Node leastLoadedNode(); void awaitMetadataUpdate(); void wakeup(); void ensureFreshMetadata(); void poll(RequestFuture<?> future); boolean poll(RequestFuture<?> future, long timeout); void poll(long timeout); void poll(long timeout, long now); void pollNoWakeup(); void executeDelayedTasks(long now); void awaitPendingRequests(Node node); int pendingRequestCount(Node node); int pendingRequestCount(); void disableWakeups(); void enableWakeups(); @Override void close(); boolean connectionFailed(Node node); void tryConnect(Node node); }
ConsumerNetworkClient implements Closeable { public void schedule(DelayedTask task, long at) { delayedTasks.add(task, at); } ConsumerNetworkClient(KafkaClient client,
        Metadata metadata,
        Time time,
        long retryBackoffMs,
        long requestTimeoutMs); void schedule(DelayedTask task, long at); void unschedule(DelayedTask task); RequestFuture<ClientResponse> send(Node node,
        ApiKeys api,
        AbstractRequest request); Node leastLoadedNode(); void awaitMetadataUpdate(); void wakeup(); void ensureFreshMetadata(); void poll(RequestFuture<?> future); boolean poll(RequestFuture<?> future, long timeout); void poll(long timeout); void poll(long timeout, long now); void pollNoWakeup(); void executeDelayedTasks(long now); void awaitPendingRequests(Node node); int pendingRequestCount(Node node); int pendingRequestCount(); void disableWakeups(); void enableWakeups(); @Override void close(); boolean connectionFailed(Node node); void tryConnect(Node node);  }