Class RWLockManager<OBJECT,CONTEXT>
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.net4j.util.concurrent.RWLockManager<OBJECT,CONTEXT>
- All Implemented Interfaces:
IRWLockManager<OBJECT,
,CONTEXT> INotifier
,INotifier.INotifier2
,IDeactivateable
,ILifecycle
,ILifecycle.DeferrableActivation
@Deprecated
public class RWLockManager<OBJECT,CONTEXT>
extends Lifecycle
implements IRWLockManager<OBJECT,CONTEXT>
Deprecated.
Support Multiple reads/no write and upgrade lock from read to write. Many context could request
write
lock at the same time. It will privileges first context that has already
a read
lock. If no one has any read lock, it's "first come first serve".- Since:
- 2.0
- Author:
- Simon McDuff
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
Deprecated.UseRWOLockManager
protected static interface
Deprecated.UseRWOLockManager
protected static interface
Deprecated.UseRWOLockManager
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
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.concurrent.IRWLockManager
IRWLockManager.LockType
-
Field Summary
Fields inherited from interface org.eclipse.net4j.util.concurrent.IRWLockManager
NO_WAIT, WAIT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
changeContext
(CONTEXT oldContext, CONTEXT newContext) Deprecated.protected RWLockManager.LockEntry<OBJECT,
CONTEXT> getLockEntry
(OBJECT objectToLock) Deprecated.protected RWLockManager.LockStrategy<OBJECT,
CONTEXT> Deprecated.protected void
handleLockEntries
(CONTEXT context, RWLockManager.LockEntryHandler<OBJECT, CONTEXT> handler) Deprecated.boolean
hasLock
(IRWLockManager.LockType type, CONTEXT context, OBJECT objectToLock) Deprecated.boolean
hasLockByOthers
(IRWLockManager.LockType type, CONTEXT context, OBJECT objectToLock) Deprecated.void
lock
(IRWLockManager.LockType type, CONTEXT context, Collection<? extends OBJECT> objectsToLock, long timeout) Deprecated.void
lock
(IRWLockManager.LockType type, CONTEXT context, OBJECT objectToLock, long timeout) Deprecated.void
Deprecated.Attempts to release all locks(read and write) for a given context.void
unlock
(IRWLockManager.LockType type, CONTEXT context, Collection<? extends OBJECT> objectsToUnlock) Deprecated.Attempts to release for a given locktype, context and objects.Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, doDeactivate, 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
-
Constructor Details
-
RWLockManager
public RWLockManager()Deprecated.
-
-
Method Details
-
lock
public void lock(IRWLockManager.LockType type, CONTEXT context, Collection<? extends OBJECT> objectsToLock, long timeout) throws InterruptedException Deprecated.- Specified by:
lock
in interfaceIRWLockManager<OBJECT,
CONTEXT> - Throws:
InterruptedException
- Since:
- 3.0
-
lock
public void lock(IRWLockManager.LockType type, CONTEXT context, OBJECT objectToLock, long timeout) throws InterruptedException Deprecated.- Specified by:
lock
in interfaceIRWLockManager<OBJECT,
CONTEXT> - Throws:
InterruptedException
- Since:
- 3.0
-
unlock
public void unlock(IRWLockManager.LockType type, CONTEXT context, Collection<? extends OBJECT> objectsToUnlock) Deprecated.Attempts to release for a given locktype, context and objects.- Specified by:
unlock
in interfaceIRWLockManager<OBJECT,
CONTEXT> - Throws:
IllegalMonitorStateException
- Unlocking objects without lock.- Since:
- 3.0
-
unlock
Deprecated.Attempts to release all locks(read and write) for a given context.- Specified by:
unlock
in interfaceIRWLockManager<OBJECT,
CONTEXT>
-
hasLock
Deprecated.- Specified by:
hasLock
in interfaceIRWLockManager<OBJECT,
CONTEXT> - Since:
- 3.0
-
hasLockByOthers
Deprecated.- Specified by:
hasLockByOthers
in interfaceIRWLockManager<OBJECT,
CONTEXT> - Since:
- 3.0
-
handleLockEntries
protected void handleLockEntries(CONTEXT context, RWLockManager.LockEntryHandler<OBJECT, CONTEXT> handler) Deprecated.- Since:
- 3.1
-
getLockEntry
Deprecated.- Since:
- 3.1
-
getLockingStrategy
protected RWLockManager.LockStrategy<OBJECT,CONTEXT> getLockingStrategy(IRWLockManager.LockType type) Deprecated.- Since:
- 3.1
-
changeContext
Deprecated.- Since:
- 3.1
-
RWOLockManager
.