public abstract class AbstractWorkerQueue<T> extends AbstractActorProcessor<T>
Constructor and Description |
---|
AbstractWorkerQueue(int size) |
Modifier and Type | Method and Description |
---|---|
int |
getSize() |
java.lang.String |
getThreadName()
Returns the current thread name.
|
boolean |
isEmpty() |
boolean |
offer(T value) |
void |
onProcessComplete()
Called when all items in the queue are processed.
|
abstract void |
process(T value)
Process a single item.
|
void |
wake() |
onProcessStart
public final boolean isEmpty()
public final int getSize()
public final boolean offer(T value)
public final void wake()
public java.lang.String getThreadName()
AbstractActorProcessor
getThreadName
in interface ActorProcessor<T>
getThreadName
in class AbstractActorProcessor<T>
public abstract void process(T value)
AbstractActorProcessor
process
in interface ActorProcessor<T>
process
in class AbstractActorProcessor<T>
public void onProcessComplete()
AbstractActorProcessor
onProcessComplete
in interface ActorProcessor<T>
onProcessComplete
in class AbstractActorProcessor<T>