| java.lang.Object org.apache.commons.transaction.file.FileSequence
FileSequence | public class FileSequence (Code) | | Fail-Safe sequence store implementation using the file system. Works by versioning
values of sequences and throwing away all versions, but the current and the previous one.
version: $Id: FileSequence.java 493628 2007-01-07 01:42:48Z joerg $ |
FileSequence | public FileSequence(String storeDir, LoggerFacade logger) throws ResourceManagerException(Code) | | Creates a new resouce manager operation on the specified directories.
Parameters: storeDir - directory where sequence information is stored Parameters: logger - logger used for warnings only |
create | public synchronized boolean create(String sequenceName, long initialValue) throws ResourceManagerException(Code) | | Creates a sequence if it does not already exist.
Parameters: sequenceName - the name of the sequence you want to create true if the sequence has been created, false if it already existed throws: ResourceManagerException - if anything goes wrong while accessing the sequence |
delete | public synchronized boolean delete(String sequenceName)(Code) | | Deletes a sequence if it exists.
Parameters: sequenceName - the name of the sequence you want to delete true if the sequence has been deleted, false if not |
exists | public synchronized boolean exists(String sequenceName)(Code) | | Checks if the sequence already exists.
Parameters: sequenceName - the name of the sequence you want to check true if the sequence already exists, false otherwise |
nextSequenceValueBottom | public synchronized long nextSequenceValueBottom(String sequenceName, long increment) throws ResourceManagerException(Code) | | Gets the next value of the sequence.
Parameters: sequenceName - the name of the sequence you want the next value for Parameters: increment - the increment for the sequence, i.e. how much to add to the sequence with this call the next value of the sequence not yet incremented, i.e. the increment is recordedinternally, but not returned with the next call to this method throws: ResourceManagerException - if anything goes wrong while accessing the sequence |
|
|