LightArrayRevolverScheduler, see #2904

- based on a wheel (AtomicReferenceArray) from which atomic
  single-linked lists dangle
- no locks
- deterministic tests due to overridable time source
- also bring docs up to date
This commit is contained in:
Roland 2013-01-14 23:21:51 +01:00
parent 9f2a0afc05
commit 8dea20a1f1
20 changed files with 863 additions and 202 deletions

View file

@ -10,6 +10,7 @@ import java.util.concurrent.TimeUnit;
//#imports1
//#imports2
import akka.actor.Actor;
import akka.actor.UntypedActor;
import akka.actor.UntypedActorFactory;
import akka.actor.Cancellable;
@ -43,7 +44,7 @@ public class SchedulerDocTestBase {
public void scheduleOneOffTask() {
//#schedule-one-off-message
system.scheduler().scheduleOnce(Duration.create(50, TimeUnit.MILLISECONDS),
testActor, "foo", system.dispatcher());
testActor, "foo", system.dispatcher(), null);
//#schedule-one-off-message
//#schedule-one-off-thunk

View file

@ -311,9 +311,8 @@ public class FaultHandlingDocSample {
counter.tell(new UseStorage(null), getSelf());
// Try to re-establish storage after while
getContext().system().scheduler().scheduleOnce(
Duration.create(10, "seconds"), getSelf(), Reconnect,
getContext().dispatcher()
);
Duration.create(10, "seconds"), getSelf(), Reconnect,
getContext().dispatcher(), null);
} else if (msg.equals(Reconnect)) {
// Re-establish storage after the scheduled delay
initStorage();