Package com.wavefront.agent.queueing
Class SQSQueueFactoryImpl
- java.lang.Object
-
- com.wavefront.agent.queueing.SQSQueueFactoryImpl
-
- All Implemented Interfaces:
TaskQueueFactory
public class SQSQueueFactoryImpl extends Object implements TaskQueueFactory
An AmazonSQS implementation ofTaskQueueFactory
- Author:
- [email protected]
-
-
Constructor Summary
Constructors Constructor Description SQSQueueFactoryImpl(String template, String region, String queueId, boolean purgeBuffer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getQueueName(HandlerKey handlerKey)
<T extends DataSubmissionTask<T>>
TaskQueue<T>getTaskQueue(HandlerKey key, int threadNum)
Create a task queue for a specifiedHandlerKey
and thread number.static boolean
isValidSQSTemplate(String template)
-
-
-
Constructor Detail
-
SQSQueueFactoryImpl
public SQSQueueFactoryImpl(String template, String region, String queueId, boolean purgeBuffer)
- Parameters:
template
- The sqsTemplateNameregion
- The region in AWS to operate againstqueueId
- The unique identifier for the queuespurgeBuffer
- Whether buffer files should be nuked before starting (this may cause data loss if queue files are not empty)
-
-
Method Detail
-
getTaskQueue
public <T extends DataSubmissionTask<T>> TaskQueue<T> getTaskQueue(@Nonnull HandlerKey key, int threadNum)
Description copied from interface:TaskQueueFactory
Create a task queue for a specifiedHandlerKey
and thread number.- Specified by:
getTaskQueue
in 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
-
getQueueName
public String getQueueName(HandlerKey handlerKey)
-
isValidSQSTemplate
public static boolean isValidSQSTemplate(String template)
-
-