|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.emarsys.ecommon.time.schedule.QueueSchedulings
public class QueueSchedulings
Varios utility functions in the context of queue schedulings.
Constructor Summary | |
---|---|
QueueSchedulings()
|
Method Summary | ||
---|---|---|
static org.apache.commons.collections.Predicate |
getMaxScheduleDatePredicate(java.util.Calendar max)
Creates a new Predicate instance for ChainElement s
that returns true if its result (see
ChainElement.getResult() ) is not null the passed max
scheduled date is after it, false otherwise. |
|
static
|
getMaxScheduleDateTresholdDecorator(QueueSchedulingStrategy<T> strategy,
java.util.Calendar maxDate)
Creates a new QueueSchedulingStrategyChain out of the
passed strategy instance that appends another ChainElement
which checks if the passed strategy calculated a next processing
date that exceeds the passed maxDate and if so
replaces it with said maximum value, but if the max. |
|
static
|
getMaxScheduleDateTresholdDecorator(QueueSchedulingStrategy<T> strategy,
SchedulableQueueElement<T> schedulable)
Creates a new QueueSchedulingStrategyChain out of the
passed strategy instance that appends another ChainElement
which checks if the passed strategy calculated a next processing
date that exceeds the
SchedulableQueueElement.getMaxScheduleDate() and if so
replaces it with said maximum value, but if the max. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueueSchedulings()
Method Detail |
---|
public static <T> QueueSchedulingStrategyChain<T> getMaxScheduleDateTresholdDecorator(QueueSchedulingStrategy<T> strategy, SchedulableQueueElement<T> schedulable)
QueueSchedulingStrategyChain
out of the
passed strategy instance that appends another ChainElement
which checks if the passed strategy calculated a next processing
date that exceeds the
SchedulableQueueElement.getMaxScheduleDate()
and if so
replaces it with said maximum value, but if the max. scheduling
date is in the past then NOW +
SchedulableQueueElement.getMinSchedulingInterval()
will
be returned.
T
- strategy
- schedulable
-
QueueSchedulingStrategyChain
instance
that has the same behavior as the passed strategy with the only
exception that it won't calculate next processing dates that
exceed that passed schedulables max schedule date except the
max. schedule date already lies in the past.public static <T> QueueSchedulingStrategyChain<T> getMaxScheduleDateTresholdDecorator(QueueSchedulingStrategy<T> strategy, java.util.Calendar maxDate)
QueueSchedulingStrategyChain
out of the
passed strategy instance that appends another ChainElement
which checks if the passed strategy calculated a next processing
date that exceeds the passed maxDate and if so
replaces it with said maximum value, but if the max. scheduling
date is in the past then NOW +
SchedulableQueueElement.getMinSchedulingInterval()
will
be returned.
If the passed max schedule date is null
no
threshold filtering willb done.
T
- strategy
- maxDate
- - the maximum schedule date
QueueSchedulingStrategyChain
instance
that has the same behavior as the passed strategy with the only
exception that it won't calculate next processing dates that
exceed the passed schedulables max schedule date except the
max. schedule date already lies in the past.public static org.apache.commons.collections.Predicate getMaxScheduleDatePredicate(java.util.Calendar max)
Predicate
instance for ChainElement
s
that returns true
if its result (see
ChainElement.getResult()
) is not null the passed max
scheduled date is after it, false
otherwise.
The predictate will also return false and print a log warning
if the Object
to evaluate is not a ChainElement
instance.
max
-
Predicate
instance that checks whether the
ChainElement
its applied to has a result that is after
the passed date.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |