Package com.martensigwart.fakeload
Interface FakeLoadScheduler
- All Known Implementing Classes:
DefaultFakeLoadScheduler
public interface FakeLoadScheduler
Object that schedules submitted
FakeLoad
objects.
This interface provides a way of decoupling a FakeLoad's submission for execution from the
mechanics of how a FakeLoad's load instructions are actually scheduled for execution.
This interface is provided as kind of utility type for the DefaultFakeLoadExecutor
to take over the responsibility of actually scheduling FakeLoads in a correct manner.
As the method provided by the FakeLoadScheduler
schedule(FakeLoad)
returns
a Future, implementations of the FakeLoadExecutor
should just call Future.get()
on the returned future. This would block the execute()
method of the FakeLoadExecutor
as required by its contract.
Class DefaultFakeLoadScheduler
provides a default implementation of this interface that uses
the FakeLoad.iterator()
method as its scheduling mechanism.
- Since:
- 1.8
- See Also:
FakeLoad
,DefaultFakeLoadScheduler
,DefaultFakeLoadExecutor