Home | Trees | Indices | Help |
---|
|
object --+ | SessionLockManager
Class with thread that keeps a global lock file that synchronizes ID and counter access across Ganga sessions. DEVELOPER WARNING: On NFS, files that are not locked with lockf (NOT flock) will NOT be synchronized across clients, even if a global lock file is used! Interface: * startup() starts the session, automatically called on init * shutdown() stops the thread, FREES ALL LOCKS * make_new_ids(n) returns n new (locked) ids * lock_ids(ids) returns the ids that were successfully locked * release_ids(ids) returns the ids that were successfully released (now: all) All access to an instance of this class MUST be synchronized! Should ONLY raise RepositoryError (if possibly-corrupting errors are found)
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
Reads a session file and returns a set of IDs locked by that session. The global lock MUST be held for this function to work, although on NFS additional locking is done Raises RepositoryError if severe access problems occur (corruption otherwise!) |
Writes the locked set to the session file. The global lock MUST be held for this function to work, although on NFS additional locking is done Raises RepositoryError if session file is inaccessible |
Tries to read the counter file. Raises ValueError (invalid contents) Raises OSError (no access/does not exist) Raises RepositoryError (fatal) |
Writes the counter to the counter file. The global lock MUST be held for this function to work correctly Raises OSError if count file is inaccessible |
Tries to determine the session that holds the lock on id for information purposes, and return an informative string. Returns None on failure |
reap_locks() --> True/False Remotely clear all foreign locks from the session. WARNING: This is not nice. Returns True on success, False on error. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Mon Jun 25 10:35:17 2012 | http://epydoc.sourceforge.net |