Class DelegableReentrantLock
- java.lang.Object
- 
- org.eclipse.net4j.util.concurrent.NonFairReentrantLock
- 
- org.eclipse.net4j.util.concurrent.DelegableReentrantLock
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.util.concurrent.locks.Lock,- IManagedContainerProvider,- INotifier,- IDeactivateable,- ILifecycle
 
 public class DelegableReentrantLock extends NonFairReentrantLock implements ILifecycle, IManagedContainerProvider - Since:
- 3.6
- Author:
- Eike Stepper
- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceDelegableReentrantLock.DelegateDetector- 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycleILifecycle.DeferrableActivation
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifierINotifier.INotifier2
 
- 
 - 
Constructor SummaryConstructors Constructor Description DelegableReentrantLock()DelegableReentrantLock(IManagedContainer container)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate()voidaddListener(IListener listener)Adds a listener to this notifier.java.lang.Exceptiondeactivate()IManagedContainergetContainer()LifecycleStategetLifecycleState()IListener[]getListeners()Returns the listeners that are registered with this notifier.booleanhasListeners()Returnstrueif one or more listeners are registered with this notifier,falseotherwise.booleanisActive()protected booleanisDelegate(java.lang.Thread thread, java.lang.Thread owner)protected booleanisOwner(java.lang.Thread thread, java.lang.Thread owner)voidremoveListener(IListener listener)Removes a listener from this notifier.- 
Methods inherited from class org.eclipse.net4j.util.concurrent.NonFairReentrantLockgetHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlock
 
- 
 
- 
- 
- 
Constructor Detail- 
DelegableReentrantLockpublic DelegableReentrantLock(IManagedContainer container) 
 - 
DelegableReentrantLockpublic DelegableReentrantLock() 
 
- 
 - 
Method Detail- 
getContainerpublic final IManagedContainer getContainer() - Specified by:
- getContainerin interface- IManagedContainerProvider
 
 - 
activatepublic final void activate() throws LifecycleException- Specified by:
- activatein interface- ILifecycle
- Throws:
- LifecycleException
 
 - 
deactivatepublic final java.lang.Exception deactivate() - Specified by:
- deactivatein interface- IDeactivateable
- Specified by:
- deactivatein interface- ILifecycle
 
 - 
getLifecycleStatepublic final LifecycleState getLifecycleState() - Specified by:
- getLifecycleStatein interface- ILifecycle
 
 - 
isActivepublic final boolean isActive() - Specified by:
- isActivein interface- ILifecycle
 
 - 
addListenerpublic final void addListener(IListener listener) Description copied from interface:INotifierAdds 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:
- addListenerin interface- INotifier
 
 - 
removeListenerpublic final void removeListener(IListener listener) Description copied from interface:INotifierRemoves a listener from this notifier.- Specified by:
- removeListenerin interface- INotifier
 
 - 
getListenerspublic final IListener[] getListeners() Description copied from interface:INotifierReturns the listeners that are registered with this notifier.Depending on the implementation duplicate listeners may be contained in the returned array. - Specified by:
- getListenersin interface- INotifier
 
 - 
hasListenerspublic final boolean hasListeners() Description copied from interface:INotifierReturnstrueif one or more listeners are registered with this notifier,falseotherwise.- Specified by:
- hasListenersin interface- INotifier
 
 - 
isOwnerprotected boolean isOwner(java.lang.Thread thread, java.lang.Thread owner)- Overrides:
- isOwnerin class- NonFairReentrantLock
 
 - 
isDelegateprotected boolean isDelegate(java.lang.Thread thread, java.lang.Thread owner)
 
- 
 
-