public class RedeliveryQueueImpl extends Object implements RedeliveryQueue
Modifier and Type | Class and Description |
---|---|
protected class |
RedeliveryQueueImpl.RedeliverCandidate |
DEFAULT_BASE_REDELIVERY_INTERVAL, DEFAULT_EXPONENTIAL_BACKOFF
Constructor and Description |
---|
RedeliveryQueueImpl(RMManager m) |
Modifier and Type | Method and Description |
---|---|
void |
addUndelivered(Message message)
Accepts a failed message for possible future redelivery.
|
protected RedeliveryQueueImpl.RedeliverCandidate |
cacheUndelivered(Message message)
Accepts a new resend candidate.
|
int |
countUndelivered() |
int |
countUndelivered(DestinationSequence seq) |
RMManager |
getManager() |
RetryStatus |
getRedeliveryStatus(DestinationSequence seq,
long num)
Returns the retransmission status for the specified message.
|
Map<Long,RetryStatus> |
getRedeliveryStatuses(DestinationSequence seq)
Return the retransmission status of all the messages assigned to the sequence.
|
protected List<RedeliveryQueueImpl.RedeliverCandidate> |
getSequenceCandidates(DestinationSequence seq) |
protected List<RedeliveryQueueImpl.RedeliverCandidate> |
getSequenceCandidates(String key) |
protected Map<String,List<RedeliveryQueueImpl.RedeliverCandidate>> |
getUndelivered() |
List<Long> |
getUndeliveredMessageNumbers(DestinationSequence seq) |
boolean |
isEmpty() |
protected boolean |
isSequenceSuspended(String key) |
void |
purgeAll(DestinationSequence seq)
Purge all candiates for the given sequence.
|
protected void |
purgeDelivered(RedeliveryQueueImpl.RedeliverCandidate candidate) |
void |
resume(DestinationSequence seq)
Resumes the redelivery attempts for the specified sequence
|
void |
setManager(RMManager m) |
void |
start()
Initiate resends.
|
void |
stop(DestinationSequence seq)
Stops redelivery queue.
|
void |
suspend(DestinationSequence seq)
Suspends the redelivery attempts for the specified sequence
|
public RedeliveryQueueImpl(RMManager m)
public RMManager getManager()
public void setManager(RMManager m)
public void addUndelivered(Message message)
RedeliveryQueue
addUndelivered
in interface RedeliveryQueue
message
- the message context.public int countUndelivered(DestinationSequence seq)
countUndelivered
in interface RedeliveryQueue
seq
- the sequence under considerationpublic int countUndelivered()
countUndelivered
in interface RedeliveryQueue
public boolean isEmpty()
isEmpty
in interface RedeliveryQueue
public void purgeAll(DestinationSequence seq)
RedeliveryQueue
purgeAll
in interface RedeliveryQueue
seq
- the sequence objectpublic List<Long> getUndeliveredMessageNumbers(DestinationSequence seq)
getUndeliveredMessageNumbers
in interface RedeliveryQueue
protected List<RedeliveryQueueImpl.RedeliverCandidate> getSequenceCandidates(DestinationSequence seq)
seq
- the sequence under considerationprotected List<RedeliveryQueueImpl.RedeliverCandidate> getSequenceCandidates(String key)
key
- the sequence identifier under considerationprotected boolean isSequenceSuspended(String key)
key
- the sequence identifier under considerationpublic RetryStatus getRedeliveryStatus(DestinationSequence seq, long num)
RedeliveryQueue
getRedeliveryStatus
in interface RedeliveryQueue
public Map<Long,RetryStatus> getRedeliveryStatuses(DestinationSequence seq)
RedeliveryQueue
getRedeliveryStatuses
in interface RedeliveryQueue
public void start()
RedeliveryQueue
start
in interface RedeliveryQueue
public void stop(DestinationSequence seq)
RedeliveryQueue
stop
in interface RedeliveryQueue
public void suspend(DestinationSequence seq)
RedeliveryQueue
suspend
in interface RedeliveryQueue
public void resume(DestinationSequence seq)
RedeliveryQueue
resume
in interface RedeliveryQueue
protected RedeliveryQueueImpl.RedeliverCandidate cacheUndelivered(Message message)
ctx
- the message context.protected void purgeDelivered(RedeliveryQueueImpl.RedeliverCandidate candidate)
protected Map<String,List<RedeliveryQueueImpl.RedeliverCandidate>> getUndelivered()
Apache CXF