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 HandlerKey
handlerKey
protected static Logger
logger
protected com.google.common.util.concurrent.RecyclableRateLimiter
rateLimiter
protected EntityProperties
runtimeProperties
protected ScheduledExecutorService
scheduler
protected TaskInjector<T>
taskInjector
protected TaskQueue<T>
taskQueue
-
Constructor Summary
Constructors Constructor Description QueueProcessor(HandlerKey handlerKey, TaskQueue<T> taskQueue, TaskInjector<T> taskInjector, ScheduledExecutorService scheduler, EntityProperties entityProps, GlobalProperties globalProps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
void
start()
Starts the process.void
stop()
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, GlobalProperties globalProps)
- Parameters:
handlerKey
- pipeline handler keytaskQueue
- backing queuetaskInjector
- injects members into task objects after deserializationentityProps
- container for mutable proxy settings.globalProps
- container for mutable global proxy settings.
-
-
Method Detail
-
start
public void start()
Description copied from interface:Managed
Starts the process.
-
-