Class DelegableReentrantLock
java.lang.Object
org.eclipse.net4j.util.concurrent.NonFairReentrantLock
org.eclipse.net4j.util.concurrent.DelegableReentrantLock
- All Implemented Interfaces:
Serializable
,Lock
,IManagedContainerProvider
,INotifier
,IDeactivateable
,ILifecycle
public class DelegableReentrantLock
extends NonFairReentrantLock
implements ILifecycle, IManagedContainerProvider
- Since:
- 3.6
- Author:
- Eike Stepper
- See Also:
-
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
activate()
final void
addListener
(IListener listener) Adds a listener to this notifier.final Exception
final IManagedContainer
final LifecycleState
final IListener[]
Returns the listeners that are registered with this notifier.final boolean
Returnstrue
if one or more listeners are registered with this notifier,false
otherwise.final boolean
isActive()
protected boolean
isDelegate
(Thread thread, Thread owner) protected boolean
final void
removeListener
(IListener listener) Removes a listener from this notifier.Methods inherited from class org.eclipse.net4j.util.concurrent.NonFairReentrantLock
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlock
-
Constructor Details
-
DelegableReentrantLock
-
DelegableReentrantLock
public DelegableReentrantLock()
-
-
Method Details
-
getContainer
- Specified by:
getContainer
in interfaceIManagedContainerProvider
-
activate
- Specified by:
activate
in interfaceILifecycle
- Throws:
LifecycleException
-
deactivate
- Specified by:
deactivate
in interfaceIDeactivateable
- Specified by:
deactivate
in interfaceILifecycle
-
getLifecycleState
- Specified by:
getLifecycleState
in interfaceILifecycle
-
isActive
public final boolean isActive()- Specified by:
isActive
in interfaceILifecycle
-
addListener
Description copied from interface:INotifier
Adds a listener to this notifier.Depending on the implementation duplicate listeners may lead to duplicate event delivery or not. Implementors are encouraged to prevent events from being delivered more than once to the same listener,
- Specified by:
addListener
in interfaceINotifier
-
removeListener
Description copied from interface:INotifier
Removes a listener from this notifier.- Specified by:
removeListener
in interfaceINotifier
-
getListeners
Description copied from interface:INotifier
Returns the listeners that are registered with this notifier.Depending on the implementation duplicate listeners may be contained in the returned array.
- Specified by:
getListeners
in interfaceINotifier
-
hasListeners
public final boolean hasListeners()Description copied from interface:INotifier
Returnstrue
if one or more listeners are registered with this notifier,false
otherwise.- Specified by:
hasListeners
in interfaceINotifier
-
isOwner
- Overrides:
isOwner
in classNonFairReentrantLock
-
isDelegate
-