public class DelegableReentrantLock extends NonFairReentrantLock implements ILifecycle
| Modifier and Type | Class and Description |
|---|---|
static interface |
DelegableReentrantLock.DelegateDetector |
ILifecycle.DeferrableActivation| Constructor and Description |
|---|
DelegableReentrantLock() |
DelegableReentrantLock(IManagedContainer container) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addListener(IListener listener)
Adds a listener to this notifier.
|
java.lang.Exception |
deactivate() |
IManagedContainer |
getContainer() |
LifecycleState |
getLifecycleState() |
IListener[] |
getListeners()
Returns the listeners that are registered with this notifier.
|
boolean |
hasListeners()
Returns
true if one or more listeners are registered with this notifier, false otherwise. |
boolean |
isActive() |
protected boolean |
isDelegate(java.lang.Thread thread,
java.lang.Thread owner) |
protected boolean |
isOwner(java.lang.Thread thread,
java.lang.Thread owner) |
void |
removeListener(IListener listener)
Removes a listener from this notifier.
|
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlockpublic DelegableReentrantLock(IManagedContainer container)
public DelegableReentrantLock()
public final IManagedContainer getContainer()
public final void activate()
throws LifecycleException
activate in interface ILifecycleLifecycleExceptionpublic final java.lang.Exception deactivate()
deactivate in interface IDeactivateabledeactivate in interface ILifecyclepublic final LifecycleState getLifecycleState()
getLifecycleState in interface ILifecyclepublic final boolean isActive()
isActive in interface ILifecyclepublic final void addListener(IListener listener)
INotifierDepending 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,
addListener in interface INotifierpublic final void removeListener(IListener listener)
INotifierremoveListener in interface INotifierpublic final IListener[] getListeners()
INotifierDepending on the implementation duplicate listeners may be contained in the returned array.
getListeners in interface INotifierpublic final boolean hasListeners()
INotifiertrue if one or more listeners are registered with this notifier, false otherwise.hasListeners in interface INotifierprotected boolean isOwner(java.lang.Thread thread,
java.lang.Thread owner)
isOwner in class NonFairReentrantLockprotected boolean isDelegate(java.lang.Thread thread,
java.lang.Thread owner)
Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html