public final class Poller<T> extends java.lang.Object implements SuspendableWorker
Modifier and Type | Class and Description |
---|---|
static interface |
Poller.PollTask<TT> |
Constructor and Description |
---|
Poller(java.lang.String identity,
Poller.PollTask<T> pollTask,
ShutdownableTaskExecutor<T> taskExecutor,
PollerOptions pollerOptions,
com.uber.m3.tally.Scope metricsScope) |
Modifier and Type | Method and Description |
---|---|
void |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isShutdown() |
boolean |
isStarted() |
boolean |
isSuspended() |
boolean |
isTerminated() |
void |
resumePolling()
Allow new poll requests.
|
void |
shutdown() |
void |
shutdownNow() |
void |
start() |
void |
suspendPolling()
Do not make new poll requests.
|
java.lang.String |
toString() |
public Poller(java.lang.String identity, Poller.PollTask<T> pollTask, ShutdownableTaskExecutor<T> taskExecutor, PollerOptions pollerOptions, com.uber.m3.tally.Scope metricsScope)
public boolean isShutdown()
isShutdown
in interface Shutdownable
public boolean isTerminated()
isTerminated
in interface Shutdownable
public void shutdown()
shutdown
in interface Shutdownable
public void shutdownNow()
shutdownNow
in interface Shutdownable
public void awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
awaitTermination
in interface Shutdownable
public void suspendPolling()
Suspendable
suspendPolling
in interface Suspendable
public void resumePolling()
Suspendable
resumePolling
in interface Suspendable
public boolean isSuspended()
isSuspended
in interface Suspendable
public java.lang.String toString()
toString
in class java.lang.Object