org.eclipse.net4j.util.lifecycle
Class QueueWorker<E>
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.net4j.util.lifecycle.Worker
org.eclipse.net4j.util.lifecycle.QueueWorker<E>
- All Implemented Interfaces:
- INotifier, INotifier.Introspection, ILifecycle, ILifecycle.Introspection
- Direct Known Subclasses:
- QueueWorkerWorkSerializer
public abstract class QueueWorker<E>
- extends Worker
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle |
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, deferredDeactivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, isDeferredDeactivation, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QueueWorker
public QueueWorker()
getPollMillis
public long getPollMillis()
setPollMillis
public void setPollMillis(long pollMillis)
addWork
public boolean addWork(E element)
work
protected final void work(Worker.WorkContext context)
throws java.lang.Exception
- Specified by:
work
in class Worker
- Throws:
java.lang.Exception
work
protected abstract void work(Worker.WorkContext context,
E element)
createQueue
protected java.util.concurrent.BlockingQueue<E> createQueue()
doActivate
protected void doActivate()
throws java.lang.Exception
- Overrides:
doActivate
in class Worker
- Throws:
java.lang.Exception
doDeactivate
protected void doDeactivate()
throws java.lang.Exception
- Overrides:
doDeactivate
in class Worker
- Throws:
java.lang.Exception