Package com.wavefront.agent.handlers
Class SenderTaskFactoryImpl
- java.lang.Object
-
- com.wavefront.agent.handlers.SenderTaskFactoryImpl
-
- All Implemented Interfaces:
SenderTaskFactory
public class SenderTaskFactoryImpl extends Object implements SenderTaskFactory
Factory forSenderTask
objects.- Author:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description SenderTaskFactoryImpl(ForceQueueEnabledProxyAPI proxyAPI, UUID proxyId, com.google.common.util.concurrent.RecyclableRateLimiter globalRateLimiter, AtomicInteger pushFlushInterval, AtomicInteger itemsPerBatch, AtomicInteger memoryBufferLimit)
Create new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<SenderTask>
createSenderTasks(HandlerKey handlerKey, int numThreads)
Create a collection ofobjects
for a specified handler key.void
drainBuffersToQueue()
Drain memory buffers to queue for all tasks.void
shutdown()
Shut down all tasks.
-
-
-
Constructor Detail
-
SenderTaskFactoryImpl
public SenderTaskFactoryImpl(ForceQueueEnabledProxyAPI proxyAPI, UUID proxyId, com.google.common.util.concurrent.RecyclableRateLimiter globalRateLimiter, AtomicInteger pushFlushInterval, @Nullable AtomicInteger itemsPerBatch, @Nullable AtomicInteger memoryBufferLimit)
Create new instance.- Parameters:
proxyAPI
- handles interaction with Wavefront servers as well as queueing.proxyId
- proxy ID.globalRateLimiter
- rate limiter to control outbound point rate.pushFlushInterval
- interval between flushes.itemsPerBatch
- max points per flush.memoryBufferLimit
- max points in task's memory buffer before queueing.
-
-
Method Detail
-
createSenderTasks
public Collection<SenderTask> createSenderTasks(@NotNull HandlerKey handlerKey, int numThreads)
Description copied from interface:SenderTaskFactory
Create a collection ofobjects
for a specified handler key.- Specified by:
createSenderTasks
in interfaceSenderTaskFactory
- Parameters:
handlerKey
- unique identifier for the handler.numThreads
- create a specified number of threads.- Returns:
- created tasks.
-
shutdown
public void shutdown()
Description copied from interface:SenderTaskFactory
Shut down all tasks.- Specified by:
shutdown
in interfaceSenderTaskFactory
-
drainBuffersToQueue
public void drainBuffersToQueue()
Description copied from interface:SenderTaskFactory
Drain memory buffers to queue for all tasks.- Specified by:
drainBuffersToQueue
in interfaceSenderTaskFactory
-
-