public abstract class Decisions extends Object
EnqueueDecisions. Can, for example, be used by
an EnqueuePolicy to return a decision.
Note that the EnqueueDecisions are only used for deciding if to enqueue or requeue a letter, and
nothing more.
EnqueuePolicy| Modifier and Type | Method and Description |
|---|---|
static <M extends Message<?>> |
doNotEnqueue()
Construct a
DoNotEnqueue defining that a dead letter should not be enqueued at all. |
static <M extends Message<?>> |
enqueue()
Construct a
ShouldEnqueue defining that a dead letter should be enqueued. |
static <M extends Message<?>> |
enqueue(Throwable enqueueCause)
Construct a
ShouldEnqueue defining that a dead letter should be enqueued because of
the given enqueueCause. |
static <M extends Message<?>> |
enqueue(Throwable enqueueCause,
Function<DeadLetter<? extends M>,MetaData> diagnosticsBuilder)
Construct a
ShouldEnqueue defining that a dead letter should be enqueued because of
the given enqueueCause. |
static <M extends Message<?>> |
evict()
Construct a
DoNotEnqueue defining that a dead letter should be evicted from the
queue. |
static <M extends Message<?>> |
ignore()
Construct an
Ignore defining that a dead letter should remain in the queue. |
static <M extends Message<?>> |
requeue(Throwable requeueCause)
Construct a
ShouldEnqueue defining that a dead letter should be requeued because of
the given requeueCause. |
static <M extends Message<?>> |
requeue(Throwable requeueCause,
Function<DeadLetter<? extends M>,MetaData> diagnosticsBuilder)
Construct a
ShouldEnqueue defining that a dead letter should be requeued because of
the given requeueCause. |
public static <M extends Message<?>> Ignore<M> ignore()
Ignore defining that a dead letter should remain in the queue.
Note that the result is only used to define the letter should remain in the queue, and nothing more.
M - The type of message contained in the DeadLetter that's been made a decision on.Ignore defining that a dead letter should remain in the queue.public static <M extends Message<?>> DoNotEnqueue<M> doNotEnqueue()
DoNotEnqueue defining that a dead letter should not be enqueued at all.
Note that the result is only used to define the letter should not be enqueued, and nothing more.
M - The type of message contained in the DeadLetter that's been made a decision on.DoNotEnqueue defining that a dead letter should not be enqueued at all.public static <M extends Message<?>> DoNotEnqueue<M> evict()
DoNotEnqueue defining that a dead letter should be evicted from the
queue.
Note that the result is only used to define the letter should be evicted from the queue, and nothing more.
M - The type of message contained in the DeadLetter that's been made a decision on.DoNotEnqueue defining that a dead letter should be evicted from the queue.public static <M extends Message<?>> ShouldEnqueue<M> enqueue()
ShouldEnqueue defining that a dead letter should be enqueued.
Note that the result is only used to define the letter should be enqueued, and nothing more.
M - The type of message contained in the DeadLetter that's been made a decision on.ShouldEnqueue defining that a dead letter should be enqueued.public static <M extends Message<?>> ShouldEnqueue<M> enqueue(Throwable enqueueCause)
ShouldEnqueue defining that a dead letter should be enqueued because of
the given enqueueCause.
Note that the result is only used to define the letter should be enqueued with the given
enqueueCause, and nothing more.
M - The type of message contained in the DeadLetter that's been made a decision on.enqueueCause - The reason for enqueueing a dead letter.ShouldEnqueue defining that a dead letter should be enqueued because of the
given enqueueCause.public static <M extends Message<?>> ShouldEnqueue<M> enqueue(Throwable enqueueCause, Function<DeadLetter<? extends M>,MetaData> diagnosticsBuilder)
ShouldEnqueue defining that a dead letter should be enqueued because of
the given enqueueCause. The diagnosticsBuilder constructs
diagnostic MetaData to append to the letter to enqueue.
Note that the result is only used to define the letter should be enqueued with the given
enqueueCause and diagnostics, and nothing more.
M - The type of message contained in the DeadLetter that's been made a decision
on.enqueueCause - The reason for enqueueing a dead letter.diagnosticsBuilder - A builder of diagnostic MetaData.ShouldEnqueue defining that a dead letter should be enqueued because of the
given enqueueCause.public static <M extends Message<?>> ShouldEnqueue<M> requeue(Throwable requeueCause)
ShouldEnqueue defining that a dead letter should be requeued because of
the given requeueCause.
Note that the result is only used to define the letter should be requeued with the given
requeueCause, and nothing more.
M - The type of message contained in the DeadLetter that's been made a decision on.requeueCause - The reason for requeueing a dead letter.ShouldEnqueue defining that a dead letter should be requeued because of the
given requeueCause.public static <M extends Message<?>> ShouldEnqueue<M> requeue(Throwable requeueCause, Function<DeadLetter<? extends M>,MetaData> diagnosticsBuilder)
ShouldEnqueue defining that a dead letter should be requeued because of
the given requeueCause. The diagnosticsBuilder constructs
diagnostic MetaData to append to the letter to requeue.
Note that the result is only used to define the letter should be requeued with the given
requeueCause and diagnostics, and nothing more.
M - The type of message contained in the DeadLetter that's been made a decision
on.requeueCause - The reason for requeueing a dead letter.diagnosticsBuilder - A builder of diagnostic MetaData.ShouldEnqueue defining that a dead letter should be requeued because of the
given requeueCause.Copyright © 2010–2025. All rights reserved.