com.caucho.env.actor
Class ActorQueue<T extends RingItem>

java.lang.Object
  extended by com.caucho.env.actor.ActorQueue<T>
All Implemented Interfaces:
ActorQueuePreallocApi<T>

public final class ActorQueue<T extends RingItem>
extends java.lang.Object
implements ActorQueuePreallocApi<T>

Interface for the transaction log.


Constructor Summary
ActorQueue(int capacity, RingItemFactory<T> itemFactory, ActorProcessor<? super T>... processors)
           
 
Method Summary
 void finishOffer(T item)
           
 int getAvailable()
           
 int getSize()
           
 boolean isEmpty()
           
 T startOffer(boolean isWait)
           
 java.lang.String toString()
           
 void wake()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActorQueue

public ActorQueue(int capacity,
                  RingItemFactory<T> itemFactory,
                  ActorProcessor<? super T>... processors)
Method Detail

isEmpty

public final boolean isEmpty()
Specified by:
isEmpty in interface ActorQueuePreallocApi<T extends RingItem>

getSize

public final int getSize()
Specified by:
getSize in interface ActorQueuePreallocApi<T extends RingItem>

getAvailable

public final int getAvailable()
Specified by:
getAvailable in interface ActorQueuePreallocApi<T extends RingItem>

wake

public final void wake()
Specified by:
wake in interface ActorQueuePreallocApi<T extends RingItem>

startOffer

public final T startOffer(boolean isWait)
Specified by:
startOffer in interface ActorQueuePreallocApi<T extends RingItem>

finishOffer

public final void finishOffer(T item)
Specified by:
finishOffer in interface ActorQueuePreallocApi<T extends RingItem>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object