public abstract class Decisions extends Object
EnqueueDecisions
. Can, for example, be used by
an EnqueuePolicy
to return a decision.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.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.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.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.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
.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.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
.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.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–2023. All rights reserved.