|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ebi.intenz.webapp.utilities.EntryLockSingleton
public class EntryLockSingleton
This class is responsible for locking entries in process.
This will be guaranteed by a synchronized Hashtable which stores the enzyme id of the entry and the users name. If a user locks an entry but quits the application without finishing its modifications, the ModificationBindingListener will take care of releasing the lock.
| Constructor Summary | |
|---|---|
protected |
EntryLockSingleton()
Initialises the Hashtable for storing enzyme ids of currently modified entries. |
| Method Summary | |
|---|---|
static EntryLockSingleton |
getInstance()
Returns the EntryLockSingleton instance. |
void |
invalidateLocks(String user)
Removes all locks of entries modified by one and the same user. |
void |
releaseLock(String enzymeId)
Removes a lock from an entry. |
boolean |
setLock(String enzymeId,
String user)
Sets a lock for an entry in process. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected EntryLockSingleton()
| Method Detail |
|---|
public static EntryLockSingleton getInstance()
public boolean setLock(String enzymeId,
String user)
enzymeId - The enzyme id of the entry to be modified.user - The user who is modifying the entry.
public void releaseLock(String enzymeId)
enzymeId - The enzyme id of the entry to be released.public void invalidateLocks(String user)
user - The user name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||