public abstract class ReferenceQueueWorker<T> extends Worker
Worker.WorkContext
ILifecycle.DeferrableActivation
Modifier and Type | Field and Description |
---|---|
static int |
ALL_WORK_PER_POLL |
static int |
DEFAULT_MAX_WORK_PER_POLL |
static int |
DEFAULT_POLL_MILLIS |
DEFAULT_ERROR_HANDLER, DEFAULT_TIMEOUT
Constructor and Description |
---|
ReferenceQueueWorker() |
Modifier and Type | Method and Description |
---|---|
int |
getMaxWorkPerPoll() |
long |
getPollMillis() |
protected ReferenceQueue<T> |
getQueue() |
void |
setMaxWorkPerPoll(int maxWorkPerPoll) |
void |
setPollMillis(long pollMillis) |
protected abstract void |
work(Reference<? extends T> reference) |
protected void |
work(Worker.WorkContext context) |
doActivate, doDeactivate, getActivationTimeout, getDeactivationTimeout, getGlobalErrorHandler, getThreadName, getWorkerThread, handleError, isDaemon, setActivationTimeout, setDaemon, setDeactivationTimeout, setGlobalErrorHandler
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
addListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addListener, getListeners, hasListeners, removeListener
public static final int ALL_WORK_PER_POLL
public static final int DEFAULT_MAX_WORK_PER_POLL
public static final int DEFAULT_POLL_MILLIS
public long getPollMillis()
public void setPollMillis(long pollMillis)
public int getMaxWorkPerPoll()
public void setMaxWorkPerPoll(int maxWorkPerPoll)
protected ReferenceQueue<T> getQueue()
protected final void work(Worker.WorkContext context) throws Exception
Copyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.