Schnittstelle IRWOLockManager<OBJECT,CONTEXT>
- Alle Superschnittstellen:
IRWLockManager<OBJECT,CONTEXT>
- Alle bekannten Implementierungsklassen:
RWOLockManager
A
read/write lock manager that supports write option
locks.- Seit:
- 3.2
- Autor:
- Caspar De Groot
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic interfaceVon Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.concurrent.IRWLockManager
IRWLockManager.LockType -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final IRWLockManager.LockTypestatic final intstatic final Collection<?> static final longVon Schnittstelle geerbte Felder org.eclipse.net4j.util.concurrent.IRWLockManager
NO_WAIT, WAIT -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunglonglonglock(CONTEXT context, Collection<? extends OBJECT> objects, IRWLockManager.LockType lockType, int count, long timeout, IRWOLockManager.LockDeltaHandler<OBJECT, CONTEXT> deltaHandler, Consumer<RWOLockManager.LockState<OBJECT, CONTEXT>> stateHandler) Adds locks of the given lockType, owned by the given context to the given objects.voidlock(IRWLockManager.LockType lockType, CONTEXT context, Collection<? extends OBJECT> objectsToLock, long timeout) Veraltet.voidlock(IRWLockManager.LockType lockType, CONTEXT context, OBJECT objectToLock, long timeout) Veraltet.lock2(IRWLockManager.LockType lockType, CONTEXT context, Collection<? extends OBJECT> objectsToLock, long timeout) Veraltet.voidVeraltet.longunlock(CONTEXT context, Collection<? extends OBJECT> objects, IRWLockManager.LockType lockType, int count, IRWOLockManager.LockDeltaHandler<OBJECT, CONTEXT> deltaHandler, Consumer<RWOLockManager.LockState<OBJECT, CONTEXT>> stateHandler) Removes locks of the given lockType, owned by the given context from the given objects.voidunlock(IRWLockManager.LockType lockType, CONTEXT context, Collection<? extends OBJECT> objectsToUnlock) Veraltet.Veraltet.unlock2(CONTEXT context, Collection<? extends OBJECT> objectsToUnlock) Veraltet.unlock2(IRWLockManager.LockType lockType, CONTEXT context, Collection<? extends OBJECT> objectsToUnlock) Veraltet.Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.concurrent.IRWLockManager
hasLock, hasLockByOthers
-
Felddetails
-
ALL_OBJECTS
- Seit:
- 3.16
-
ALL_LOCK_TYPES
- Seit:
- 3.16
-
ALL_LOCKS
static final int ALL_LOCKS- Seit:
- 3.16
- Siehe auch:
-
NO_TIMEOUT
static final long NO_TIMEOUT- Seit:
- 3.16
- Siehe auch:
-
-
Methodendetails
-
getModCount
long getModCount()- Seit:
- 3.16
-
lock
long lock(CONTEXT context, Collection<? extends OBJECT> objects, IRWLockManager.LockType lockType, int count, long timeout, IRWOLockManager.LockDeltaHandler<OBJECT, CONTEXT> deltaHandler, Consumer<RWOLockManager.LockState<OBJECT, throws InterruptedException, TimeoutRuntimeExceptionCONTEXT>> stateHandler) Adds locks of the given lockType, owned by the given context to the given objects.- Parameter:
context- The lock context to add from theobjects. Must not benull.objects- The objects to lock. Must not benull.lockType- The type of lock to add to theobjects. Must not benull.count- The number of locks to add to each of theobjects.timeout- The period in milliseconds after that aTimeoutRuntimeExceptionis thrown if some or all of theobjectscould not be locked, orNO_TIMEOUTto attempt forever to acquire the requested locks.deltaHandler- A handler that is notified with each delta in alock state, ornullif no such notification is needed. The handler is notified at most once per delta, but it can happen that the handler is notified before the lock operation finally fails with one of the specified exceptions. The notification handling should be fast because notifications occur while the calling thread is synchronized on this lock manager.stateHandler- A handler that is notified with each newlock state, ornullif no such notification is needed.. The handler is notified at most once per lock state, but it can happen that the handler is notified before the lock operation finally fails with one of the specified exceptions. The notification handling should be fast because notifications occur while the calling thread is synchronized on this lock manager.- Gibt zurück:
- The new
modification count. - Löst aus:
InterruptedException- If the calling thread is interrupted.TimeoutRuntimeException- If the timeout period has expired and some or all of theobjectscould not be locked.- Seit:
- 3.16
-
unlock
long unlock(CONTEXT context, Collection<? extends OBJECT> objects, IRWLockManager.LockType lockType, int count, IRWOLockManager.LockDeltaHandler<OBJECT, CONTEXT> deltaHandler, Consumer<RWOLockManager.LockState<OBJECT, CONTEXT>> stateHandler) Removes locks of the given lockType, owned by the given context from the given objects.- Parameter:
context- The lock context to remove from theobjects. Must not benull.objects- The objects to unlock, orALL_OBJECTSto unlock all objects of thecontext.lockType- The type of lock to remove from theobjects, orALL_LOCK_TYPESto remove the locks of all types.count- The number of locks to remove from each of theobjects, orALL_LOCKSto remove all locks.deltaHandler- A handler that is notified with each delta in aRWOLockManager.LockState, ornullif no such notification is needed.stateHandler- A handler that is notified with each newRWOLockManager.LockState, ornullif no such notification is needed.- Seit:
- 3.16
-
lock2
@Deprecated List<RWOLockManager.LockState<OBJECT,CONTEXT>> lock2(IRWLockManager.LockType lockType, CONTEXT context, Collection<? extends OBJECT> objectsToLock, long timeout) throws InterruptedException Veraltet.- Löst aus:
InterruptedException
-
unlock2
@Deprecated List<RWOLockManager.LockState<OBJECT,CONTEXT>> unlock2(IRWLockManager.LockType lockType, CONTEXT context, Collection<? extends OBJECT> objectsToUnlock) Veraltet. -
unlock2
@Deprecated List<RWOLockManager.LockState<OBJECT,CONTEXT>> unlock2(CONTEXT context, Collection<? extends OBJECT> objectsToUnlock) Veraltet. -
unlock2
Veraltet. -
lock
@Deprecated void lock(IRWLockManager.LockType lockType, CONTEXT context, Collection<? extends OBJECT> objectsToLock, long timeout) throws InterruptedException Veraltet.- Angegeben von:
lockin SchnittstelleIRWLockManager<OBJECT,CONTEXT> - Löst aus:
InterruptedException
-
lock
@Deprecated void lock(IRWLockManager.LockType lockType, CONTEXT context, OBJECT objectToLock, long timeout) throws InterruptedException Veraltet.- Angegeben von:
lockin SchnittstelleIRWLockManager<OBJECT,CONTEXT> - Löst aus:
InterruptedException
-
unlock
@Deprecated void unlock(IRWLockManager.LockType lockType, CONTEXT context, Collection<? extends OBJECT> objectsToUnlock) Veraltet.Beschreibung aus Schnittstelle kopiert:IRWLockManagerAttempts to release for a given lock type, context and objects.- Angegeben von:
unlockin SchnittstelleIRWLockManager<OBJECT,CONTEXT>
-
unlock
Veraltet.Beschreibung aus Schnittstelle kopiert:IRWLockManagerAttempts to release all locks(read and write) for a given context.- Angegeben von:
unlockin SchnittstelleIRWLockManager<OBJECT,CONTEXT>
-