
public abstract class ReferenceQueueWorker<T> extends Worker
Worker.WorkContextILifecycle.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, handleError, isDaemon, setActivationTimeout, setDaemon, setDeactivationTimeout, setGlobalErrorHandleractivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringaddListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, getListeners, hasListeners, removeListenerpublic 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-2014 Eike Stepper (Berlin, Germany) and others.