Package Ganga :: Package Core :: Package GangaRepository :: Module GangaRepositoryXML :: Class GangaRepositoryLocal
[hide private]
[frames] | no frames]

Class GangaRepositoryLocal

source code

                     object --+    
                              |    
GangaRepository.GangaRepository --+
                                  |
                                 GangaRepositoryLocal

GangaRepository Local

Instance Methods [hide private]
 
__init__(self, registry)
GangaRepository constructor.
source code
 
startup(self)
Starts an repository and reads in a directory structure.
source code
 
shutdown(self)
Shutdown the repository.
source code
 
get_fn(self, id)
Returns the file name where the data for this object id is saved
source code
 
get_idxfn(self, id)
Returns the file name where the data for this object id is saved
source code
 
index_load(self, id)
load the index file for this object if necessary Loads if never loaded or timestamp changed.
source code
 
index_write(self, id)
write an index file for this object (must be locked).
source code
 
get_index_listing(self)
Get dictionary of possible objects in the Repository: True means index is present,...
source code
 
update_index(self, id=None, verbose=False)
Update the list of available objects Raise RepositoryError
source code
 
add(self, objs, force_ids=None)
Add the given objects to the repository, forcing the IDs if told to.
source code
 
flush(self, ids)
flush(ids) --> None Writes the objects specified by the ids to the persistency layer.
source code
 
load(self, ids, load_backup=False)
load(ids) --> None Load the objects specified by the ids from the persistency layer.
source code
 
delete(self, ids)
delete(ids) --> None Delete the objects specified by the ids from the repository.
source code
 
lock(self, ids)
lock(ids) --> bool Locks the specified IDs against modification from other Ganga sessions Raise RepositoryError Returns successfully locked ids
source code
 
unlock(self, ids)
unlock(ids) --> None Unlock the specified IDs to allow another Ganga session to modify them EXPERIMENTAL - does not have to be implemented.
source code
 
get_lock_session(id)
Tries to determine the session that holds the lock on id for information purposes, and return an informative string.
source code
 
get_other_sessions()
Tries to determine the other sessions that are active and returns an informative string for each of them.
source code
 
reap_locks(self)
reap_locks() --> True/False Remotely clear all foreign locks from the session.
source code
 
clean(self)
clean() --> True/False Clear EVERYTHING in this repository, counter, all jobs, etc.
source code

Inherited from GangaRepository.GangaRepository: _internal_del__, _internal_setitem__, _make_empty_object_

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, registry)
(Constructor)

source code 

GangaRepository constructor. Initialization should be done in startup()

Overrides: object.__init__
(inherited documentation)

startup(self)

source code 

Starts an repository and reads in a directory structure. Raise RepositoryError

Overrides: GangaRepository.GangaRepository.startup

shutdown(self)

source code 

Shutdown the repository. Flushing is done by the Registry Raise RepositoryError

Overrides: GangaRepository.GangaRepository.shutdown

index_load(self, id)

source code 

load the index file for this object if necessary Loads if never loaded or timestamp changed. Creates object if necessary Returns True if this object has been changed, False if not Raise IOError on access or unpickling error Raise OSError on stat error Raise PluginManagerError if the class name is not found

index_write(self, id)

source code 

write an index file for this object (must be locked). Should not raise any Errors

get_index_listing(self)

source code 
Get dictionary of possible objects in the Repository: True means index is present,
    False if not present
Raise RepositoryError

update_index(self, id=None, verbose=False)

source code 

Update the list of available objects Raise RepositoryError

Overrides: GangaRepository.GangaRepository.update_index

add(self, objs, force_ids=None)

source code 

Add the given objects to the repository, forcing the IDs if told to. Raise RepositoryError

Overrides: GangaRepository.GangaRepository.add

flush(self, ids)

source code 

flush(ids) --> None Writes the objects specified by the ids to the persistency layer. Raise KeyError Raise RepositoryError

Overrides: GangaRepository.GangaRepository.flush
(inherited documentation)

load(self, ids, load_backup=False)

source code 

load(ids) --> None Load the objects specified by the ids from the persistency layer. Raise KeyError Raise RepositoryError

Overrides: GangaRepository.GangaRepository.load
(inherited documentation)

delete(self, ids)

source code 

delete(ids) --> None Delete the objects specified by the ids from the repository. Assumes that the objects associated to the ids are locked (!) Call _internal_del__(id) for each id to remove the GangaObject from the Registry Raise KeyError Raise RepositoryError

Overrides: GangaRepository.GangaRepository.delete
(inherited documentation)

lock(self, ids)

source code 

lock(ids) --> bool Locks the specified IDs against modification from other Ganga sessions Raise RepositoryError Returns successfully locked ids

Overrides: GangaRepository.GangaRepository.lock
(inherited documentation)

unlock(self, ids)

source code 

unlock(ids) --> None Unlock the specified IDs to allow another Ganga session to modify them EXPERIMENTAL - does not have to be implemented.

Overrides: GangaRepository.GangaRepository.unlock
(inherited documentation)

get_lock_session(id)

source code 

Tries to determine the session that holds the lock on id for information purposes, and return an informative string. Returns None on failure

Overrides: GangaRepository.GangaRepository.get_lock_session

get_other_sessions()

source code 

Tries to determine the other sessions that are active and returns an informative string for each of them.

Overrides: GangaRepository.GangaRepository.get_other_sessions

reap_locks(self)

source code 

reap_locks() --> True/False Remotely clear all foreign locks from the session. WARNING: This is not nice. Returns True on success, False on error.

Overrides: GangaRepository.GangaRepository.reap_locks

clean(self)

source code 

clean() --> True/False Clear EVERYTHING in this repository, counter, all jobs, etc. WARNING: This is not nice.

Overrides: GangaRepository.GangaRepository.clean