Package com.wavefront.agent.queueing
Class TaskQueueFactoryImpl
- java.lang.Object
-
- com.wavefront.agent.queueing.TaskQueueFactoryImpl
-
- All Implemented Interfaces:
TaskQueueFactory
public class TaskQueueFactoryImpl extends Object implements TaskQueueFactory
A caching implementation of aTaskQueueFactory.- Author:
- [email protected].
-
-
Constructor Summary
Constructors Constructor Description TaskQueueFactoryImpl(String bufferFile, boolean purgeBuffer, boolean disableSharding, int shardSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends DataSubmissionTask<T>>
TaskQueue<T>getTaskQueue(HandlerKey key, int threadNum)Create a task queue for a specifiedHandlerKeyand thread number.
-
-
-
Constructor Detail
-
TaskQueueFactoryImpl
public TaskQueueFactoryImpl(String bufferFile, boolean purgeBuffer, boolean disableSharding, int shardSize)
- Parameters:
bufferFile- File name prefix for queue file names.purgeBuffer- Whether buffer files should be nuked before starting (this may cause data loss if queue files are not empty).disableSharding- disable buffer sharding (use single file)shardSize- target shard size (in MBytes)
-
-
Method Detail
-
getTaskQueue
public <T extends DataSubmissionTask<T>> TaskQueue<T> getTaskQueue(@Nonnull HandlerKey key, int threadNum)
Description copied from interface:TaskQueueFactoryCreate a task queue for a specifiedHandlerKeyand thread number.- Specified by:
getTaskQueuein interfaceTaskQueueFactory- Parameters:
key- handler key for theTaskQueue. Usually part of the file name.threadNum- thread number. Usually part of the file name.- Returns:
- task queue for the specified thread
-
-