|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.emarsys.ecommon.time.schedule.ConstantQueueSchedulingStrategy<T>
public class ConstantQueueSchedulingStrategy<T>
ConstantQueueSchedulingStrategy
will compute the next
schedule date by adding its intervalMillis to the current time which
will be retrieved by QueueScheduler.now()
.
Field Summary | |
---|---|
protected int |
intervalMillis
|
Constructor Summary | |
---|---|
ConstantQueueSchedulingStrategy(int interval)
|
Method Summary | |
---|---|
java.util.Calendar |
calculateNextProcessing(QueueScheduler<T> scheduler,
SchedulableQueueElement<T> schedulable)
Performs the concrete scheduling algorithm defined by this QueueSchedulingStrategy on the passed
SchedulableQueueElement . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int intervalMillis
Constructor Detail |
---|
public ConstantQueueSchedulingStrategy(int interval)
intervalMillis
- Method Detail |
---|
public java.util.Calendar calculateNextProcessing(QueueScheduler<T> scheduler, SchedulableQueueElement<T> schedulable)
QueueSchedulingStrategy
Performs the concrete scheduling algorithm defined by this
QueueSchedulingStrategy
on the passed
SchedulableQueueElement
.
All information needed by the algorithm should be retrieved from the passed schedulable and scheduler instances.
The passed schedulable should not be altered by this algorithm.
In order to decouple the scheduling algorithm as much as possible
and to preserve flexibility and reusabiltiy the schedulable
should itself be responsible for changing its internal state
in its SchedulableQueueElement.getScheduled(QueueScheduler)
method.
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 |