2011-10-04 15:22:41 +02:00
|
|
|
/**
|
|
|
|
|
* Copyright (C) 2009-2011 Typesafe Inc. <http://www.typesafe.com>
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package akka.dispatch;
|
|
|
|
|
|
|
|
|
|
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
|
2011-10-18 18:06:17 +02:00
|
|
|
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
|
2011-10-04 15:22:41 +02:00
|
|
|
|
|
|
|
|
abstract class AbstractMailbox {
|
2011-10-04 14:28:05 +02:00
|
|
|
private volatile int _status; // not initialized because this is faster: 0 == Open
|
2011-10-18 18:06:17 +02:00
|
|
|
protected final static AtomicIntegerFieldUpdater<AbstractMailbox> updater =
|
|
|
|
|
AtomicIntegerFieldUpdater.newUpdater(AbstractMailbox.class, "_status");
|
|
|
|
|
|
|
|
|
|
private volatile SystemMessage _systemQueue; // not initialized because this is faster
|
|
|
|
|
protected final static AtomicReferenceFieldUpdater<AbstractMailbox, SystemMessage> systemQueueUpdater =
|
|
|
|
|
AtomicReferenceFieldUpdater.newUpdater(AbstractMailbox.class, SystemMessage.class, "_systemQueue");
|
2011-10-04 14:28:05 +02:00
|
|
|
}
|