public class ResequencingProcessor extends ScheduledMessageProcessor
ScheduledMessageProcessor.State
Modifier and Type | Field and Description |
---|---|
static String |
DELETE_DUPLICATES |
static String |
NEXT_SEQUENCE
Sequence that the messages should be passed to
|
static String |
REQ_INIT_MSGS
Required initial number of messages
|
static String |
REQ_INIT_MSGS_DELAY
Delay until getting required number of messages receive
|
static String |
SEQUENCE_NUMBER_XPATH
xpath expression to extract the sequence number
|
static int |
STARTING_NUMBER_INIT_DELAY
Delay time period required for Resequencer processor while initializing starting sequence number
|
int |
tried
Number of times currently processor waited until required number of messages come
Max value is determined by requiredInitMsgs variable value
|
cronExpression, interval, PROCESSOR_INSTANCE, quartzConfig, SCHEDULED_MESSAGE_PROCESSOR_GROUP, scheduler, state
configuration, description, fileName, messageStore, name, parameters
Constructor and Description |
---|
ResequencingProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activate the Resequencing processor
Set the active value to true
|
void |
deactivate()
De-activate the resequencing processor
Set the active value to false
|
void |
destroy()
Destroy the processor's resequencing job
|
boolean |
getDeleteDuplicates()
Check whether to delete duplicate messages or not
|
protected org.quartz.JobBuilder |
getJobBuilder()
Get the job details with Name and Job Class
|
protected org.quartz.JobDataMap |
getJobDataMap()
Get the map that contains parameters related to Resequencing job
|
int |
getNextSeqNo()
Returns the next sequence number
|
AtomicInteger |
getRequiredInitMsgs()
Get the number initial messages required before set starting sequence number
|
AtomicInteger |
getRequiredInitMsgsDelay()
Delay until requiredInitMsgs get set
|
void |
incrementNextSeqNo()
Increase the sequence number by one
|
void |
init(SynapseEnvironment se)
Initiate the processor with SynapseEnvironment
|
boolean |
isActive()
Check if the processor is active or not
|
AtomicBoolean |
isInitSeqNo()
Indicate whether the initial sequencer number is set
|
void |
setDeleteDuplicates(AtomicBoolean deleteDuplicates)
Set to delete duplicate messages
|
void |
setInitSeqNo(AtomicBoolean initSeqNo)
Set or clear the initSeqNo value
|
void |
setNextSeqNo(int value)
This method allow to change the value of nextSeqNo variable, which is used to determine
the sequence number of the message next to go
|
void |
setRequiredInitMsgs(AtomicInteger requiredInitMsgs)
Set the number of messages required before set starting sequence number
|
void |
setRequiredInitMsgsDelay(AtomicInteger requiredInitMsgsDelay)
Set the delay until requiredInitMsgs get set
|
setParameters, start, stop
getDescription, getFileName, getMessageStoreName, getName, getParameters, isStarted, setDescription, setFileName, setMessageStoreName, setName
public static final String SEQUENCE_NUMBER_XPATH
public static final String NEXT_SEQUENCE
public static final String REQ_INIT_MSGS
public static final String REQ_INIT_MSGS_DELAY
public static final int STARTING_NUMBER_INIT_DELAY
public int tried
public static final String DELETE_DUPLICATES
public void init(SynapseEnvironment se)
init
in interface ManagedLifecycle
init
in class ScheduledMessageProcessor
se
- - SynapseEnvironment to be setprotected org.quartz.JobBuilder getJobBuilder()
getJobBuilder
in class ScheduledMessageProcessor
protected org.quartz.JobDataMap getJobDataMap()
getJobDataMap
in class ScheduledMessageProcessor
public void destroy()
destroy
in interface ManagedLifecycle
destroy
in class ScheduledMessageProcessor
public void activate()
public boolean isActive()
public void deactivate()
public int getNextSeqNo()
public void setNextSeqNo(int value)
value
- - The value to setpublic void incrementNextSeqNo()
public AtomicBoolean isInitSeqNo()
public void setInitSeqNo(AtomicBoolean initSeqNo)
initSeqNo
- - boolean value to setpublic AtomicInteger getRequiredInitMsgs()
public void setRequiredInitMsgs(AtomicInteger requiredInitMsgs)
requiredInitMsgs
- - number of messages need to waitpublic AtomicInteger getRequiredInitMsgsDelay()
public void setRequiredInitMsgsDelay(AtomicInteger requiredInitMsgsDelay)
requiredInitMsgsDelay
- - value for delaypublic boolean getDeleteDuplicates()
public void setDeleteDuplicates(AtomicBoolean deleteDuplicates)
deleteDuplicates
- Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.