Class Worker
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.net4j.util.concurrent.Worker
- All Implemented Interfaces:
INotifier
,INotifier.INotifier2
,IDeactivateable
,ILifecycle
,ILifecycle.DeferrableActivation
- Direct Known Subclasses:
Cache
,CacheMonitor
,QueueWorker
,ReferenceQueueWorker
,RollingLog
- Since:
- 2.0
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
long
long
static IErrorHandler
protected String
org.eclipse.net4j.util.concurrent.Worker.WorkerThread
protected void
handleError
(Exception ex) boolean
isDaemon()
void
setActivationTimeout
(long activationTimeout) void
setDaemon
(boolean daemon) void
setDeactivationTimeout
(long deactivationTimeout) static IErrorHandler
setGlobalErrorHandler
(IErrorHandler globalErrorHandler) protected abstract void
work
(Worker.WorkContext context) Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Field Details
-
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT- See Also:
-
DEFAULT_ERROR_HANDLER
- Since:
- 3.0
-
-
Constructor Details
-
Worker
public Worker()
-
-
Method Details
-
isDaemon
public boolean isDaemon() -
setDaemon
public void setDaemon(boolean daemon) -
getActivationTimeout
public long getActivationTimeout() -
setActivationTimeout
public void setActivationTimeout(long activationTimeout) -
getDeactivationTimeout
public long getDeactivationTimeout() -
setDeactivationTimeout
public void setDeactivationTimeout(long deactivationTimeout) -
getWorkerThread
public org.eclipse.net4j.util.concurrent.Worker.WorkerThread getWorkerThread()- Since:
- 3.6
-
doActivate
- Overrides:
doActivate
in classLifecycle
- Throws:
Exception
-
doDeactivate
- Overrides:
doDeactivate
in classLifecycle
- Throws:
Exception
-
getThreadName
-
handleError
- Since:
- 3.1
-
work
- Throws:
Exception
-
getGlobalErrorHandler
- Since:
- 3.0
-
setGlobalErrorHandler
- Since:
- 3.0
-