|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.commons.coordinate.cluster.lock.ClusterLocker
public class ClusterLocker
Description:
the cluster implementation for the Locker.
It uses a database table oc_lock to perform the locking.
Initial Date: 21.09.2007
| Constructor Summary | |
|---|---|
ClusterLocker()
[used by spring] |
|
| Method Summary | |
|---|---|
LockResult |
acquireLock(OLATResourceable ores,
Identity requestor,
java.lang.String locksubkey)
|
java.util.List<LockEntry> |
adminOnlyGetLockEntries()
for admin purposes only. |
LockResult |
aquirePersistentLock(OLATResourceable ores,
Identity ident,
java.lang.String locksubkey)
acquires a persistent lock. |
void |
event(Event event)
receives all sign on / sign off events so it can release locks of users which have or are logged off |
void |
init()
[used by spring] |
boolean |
isLocked(OLATResourceable ores,
java.lang.String locksubkey)
|
void |
releaseLock(LockResult lockResult)
releases the lock. |
void |
releasePersistentLock(LockResult lockResult)
releases a persistent lock. |
void |
setEventBus(EventBus eventBus)
[used by spring] |
void |
setSyncer(Syncer syncer)
[used by spring] |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClusterLocker()
| Method Detail |
|---|
public void init()
public LockResult acquireLock(OLATResourceable ores,
Identity requestor,
java.lang.String locksubkey)
acquireLock in interface Lockerores - the OLATResourceable to lock upon, e.g a repositoryentry or suchrequestor - the identity who tries to acquire the lock, not nulllocksubkey - null or any string to lock finer upon the resource (e.g. "authors", or "write", ...)
public void event(Event event)
event in interface GenericEventListenerGenericEventListener.event(org.olat.core.gui.control.Event)
public boolean isLocked(OLATResourceable ores,
java.lang.String locksubkey)
isLocked in interface Lockerpublic void releaseLock(LockResult lockResult)
Locker
releaseLock in interface LockerlockResult - the LockResult received when lockingpublic java.util.List<LockEntry> adminOnlyGetLockEntries()
Locker
adminOnlyGetLockEntries in interface Locker
public LockResult aquirePersistentLock(OLATResourceable ores,
Identity ident,
java.lang.String locksubkey)
Locker
aquirePersistentLock in interface Lockerlocksubkey - may not be longer than 30 chars
public void releasePersistentLock(LockResult lockResult)
Locker
releasePersistentLock in interface LockerlockResult - the LockResult which stems from the lock acquired previouslypublic void setSyncer(Syncer syncer)
syncer - public void setEventBus(EventBus eventBus)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||