Package com.wavefront.agent.queueing
Class QueueProcessor<T extends DataSubmissionTask<T>>
- java.lang.Object
-
- com.wavefront.agent.queueing.QueueProcessor<T>
-
- Type Parameters:
T- type of queued tasks
public class QueueProcessor<T extends DataSubmissionTask<T>> extends Object implements Runnable, Managed
A thread responsible for processing the backlog from a single task queue.- Author:
- [email protected]
-
-
Field Summary
Fields Modifier and Type Field Description protected HandlerKeyhandlerKeyprotected static Loggerloggerprotected com.google.common.util.concurrent.RecyclableRateLimiterrateLimiterprotected EntityPropertiesruntimePropertiesprotected ScheduledExecutorServiceschedulerprotected TaskInjector<T>taskInjectorprotected TaskQueue<T>taskQueue
-
Constructor Summary
Constructors Constructor Description QueueProcessor(HandlerKey handlerKey, TaskQueue<T> taskQueue, TaskInjector<T> taskInjector, ScheduledExecutorService scheduler, EntityProperties entityProps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()voidstart()Starts the process.voidstop()Stops the process.
-
-
-
Field Detail
-
logger
protected static final Logger logger
-
handlerKey
protected final HandlerKey handlerKey
-
taskQueue
protected final TaskQueue<T extends DataSubmissionTask<T>> taskQueue
-
scheduler
protected final ScheduledExecutorService scheduler
-
taskInjector
protected final TaskInjector<T extends DataSubmissionTask<T>> taskInjector
-
runtimeProperties
protected final EntityProperties runtimeProperties
-
rateLimiter
protected final com.google.common.util.concurrent.RecyclableRateLimiter rateLimiter
-
-
Constructor Detail
-
QueueProcessor
public QueueProcessor(HandlerKey handlerKey, @Nonnull TaskQueue<T> taskQueue, TaskInjector<T> taskInjector, ScheduledExecutorService scheduler, EntityProperties entityProps)
- Parameters:
handlerKey- pipeline handler keytaskQueue- backing queuetaskInjector- injects members into task objects after deserializationentityProps- container for mutable proxy settings.
-
-
Method Detail
-
start
public void start()
Description copied from interface:ManagedStarts the process.
-
-