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.
|
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(Thread thread,
Thread owner) |
protected boolean |
isOwner(Thread thread,
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, unlock
public DelegableReentrantLock(IManagedContainer container)
public DelegableReentrantLock()
public final IManagedContainer getContainer()
public final void activate() throws LifecycleException
activate
in interface ILifecycle
LifecycleException
public final Exception deactivate()
deactivate
in interface IDeactivateable
deactivate
in interface ILifecycle
public final LifecycleState getLifecycleState()
getLifecycleState
in interface ILifecycle
public final boolean isActive()
isActive
in interface ILifecycle
public final void addListener(IListener listener)
INotifier
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,
addListener
in interface INotifier
public final void removeListener(IListener listener)
INotifier
removeListener
in interface INotifier
public final IListener[] getListeners()
INotifier
Depending on the implementation duplicate listeners may be contained in the returned array.
getListeners
in interface INotifier
public final boolean hasListeners()
INotifier
true
if one or more listeners are registered with this notifier, false
otherwise.hasListeners
in interface INotifier
protected boolean isOwner(Thread thread, Thread owner)
isOwner
in class NonFairReentrantLock
Copyright (c) 2014 Eike Stepper (Berlin, 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