|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.emarsys.ecommon.time.schedule.mock.MockSchedulingStrategy<T>
public class MockSchedulingStrategy<T>
A mock implementation of a QueueSchedulingStrategy
for
T
s.
Field Summary | |
---|---|
protected java.util.Calendar |
nextProcessing
|
Constructor Summary | |
---|---|
MockSchedulingStrategy()
|
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 . |
void |
setNextProcessing(java.util.Calendar nextProcessing)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Calendar nextProcessing
Constructor Detail |
---|
public MockSchedulingStrategy()
Method Detail |
---|
public void setNextProcessing(java.util.Calendar nextProcessing)
nextProcessing
- 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 |