|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.emarsys.ecommon.time.schedule.FixedQueueSchedulingStrategy<T>
public class FixedQueueSchedulingStrategy<T>
The FixedQueueSchedulingStrategy
will "calculate" the
next processing date by just setting its fixed scheduleDate
.
See calculateNextProcessing(QueueScheduler, SchedulableQueueElement)
for details.
Field Summary | |
---|---|
protected java.util.Calendar |
scheduleDate
|
Constructor Summary | |
---|---|
FixedQueueSchedulingStrategy(java.util.Calendar scheduleDate)
Creates a new FixedQueueSchedulingStrategy initialized
with the passed, fixed schedule date. |
Method Summary | |
---|---|
java.util.Calendar |
calculateNextProcessing(QueueScheduler<T> scheduler,
SchedulableQueueElement<T> schedulable)
If this scheduleDate is after
(see Calendar.after(Object) ) NOW
(see QueueScheduler.now() then it will be returned,
otherwise NOW +
SchedulableQueueElement.getMinSchedulingInterval()
will be returned. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Calendar scheduleDate
Constructor Detail |
---|
public FixedQueueSchedulingStrategy(java.util.Calendar scheduleDate)
FixedQueueSchedulingStrategy
initialized
with the passed, fixed schedule date.
scheduleDate
- - the fixed schedule dateMethod Detail |
---|
public java.util.Calendar calculateNextProcessing(QueueScheduler<T> scheduler, SchedulableQueueElement<T> schedulable)
scheduleDate
is after
(see Calendar.after(Object)
) NOW
(see QueueScheduler.now()
then it will be returned,
otherwise NOW +
SchedulableQueueElement.getMinSchedulingInterval()
will be returned. This behavior is necessary because upcoming
processing dates in the past does not make sense.
calculateNextProcessing
in interface QueueSchedulingStrategy<T>
scheduler
- - the QueueScheduler
that is associated
with this strategy instanceschedulable
- - the SchedulableQueueElement
that
will be (re)scheduled
SchedulableQueueElement
QueueSchedulingStrategy.calculateNextProcessing(com.emarsys.ecommon.time.schedule.QueueScheduler, com.emarsys.ecommon.time.schedule.SchedulableQueueElement)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |