public interface FakeLoadScheduler
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.
FakeLoad,
DefaultFakeLoadScheduler,
DefaultFakeLoadExecutor| Modifier and Type | Method and Description |
|---|---|
Future<Void> |
schedule(FakeLoad fakeLoad)
Schedules a
FakeLoad's load instructions for execution at the right time. |
Copyright © 2017. All rights reserved.