com.caucho.env.actor
Class AbstractActorProcessor<T>

java.lang.Object
  extended by com.caucho.env.actor.AbstractActorProcessor<T>
All Implemented Interfaces:
ActorProcessor<T>
Direct Known Subclasses:
AbstractWorkerQueue, JournalWriteActor

public abstract class AbstractActorProcessor<T>
extends java.lang.Object
implements ActorProcessor<T>

Processes an actor item.


Constructor Summary
AbstractActorProcessor()
           
 
Method Summary
 java.lang.String getThreadName()
          Returns the current thread name.
 void onProcessComplete()
          Called when all items in the queue are processed.
 void onProcessStart()
          Called when all items in the queue are processed.
abstract  void process(T item)
          Process a single item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractActorProcessor

public AbstractActorProcessor()
Method Detail

getThreadName

public java.lang.String getThreadName()
Returns the current thread name.

Specified by:
getThreadName in interface ActorProcessor<T>

onProcessStart

public void onProcessStart()
                    throws java.lang.Exception
Called when all items in the queue are processed. This can be used to flush buffers.

Specified by:
onProcessStart in interface ActorProcessor<T>
Throws:
java.lang.Exception

process

public abstract void process(T item)
                      throws java.lang.Exception
Process a single item.

Specified by:
process in interface ActorProcessor<T>
Throws:
java.lang.Exception

onProcessComplete

public void onProcessComplete()
                       throws java.lang.Exception
Called when all items in the queue are processed. This can be used to flush buffers.

Specified by:
onProcessComplete in interface ActorProcessor<T>
Throws:
java.lang.Exception