Example usage for org.apache.commons.transaction.file FileSequence FileSequence

List of usage examples for org.apache.commons.transaction.file FileSequence FileSequence

Introduction

In this page you can find the example usage for org.apache.commons.transaction.file FileSequence FileSequence.

Prototype

public FileSequence(String storeDir, LoggerFacade logger) throws ResourceManagerException 

Source Link

Document

Creates a new resouce manager operation on the specified directories.

Usage

From source file:org.apache.slide.store.txfile.FileSequenceStore.java

public void setParameters(Hashtable parameters)
        throws ServiceParameterErrorException, ServiceParameterMissingException {

    storeDir = (String) parameters.get(STORE_DIR_PARAMETER);
    if (storeDir == null) {
        throw new ServiceParameterMissingException(this, STORE_DIR_PARAMETER);
    }//  w w w.  j av  a  2 s .  c o m

    try {
        fileSequence = new FileSequence(storeDir, new TxLogger(getLogger(), LOG_CHANNEL));
        getLogger().log("File Sequence Store configured to " + storeDir, LOG_CHANNEL, Logger.INFO);
    } catch (ResourceManagerException e) {
        getLogger().log("Can not initialize File Sequence Store", e, LOG_CHANNEL, Logger.CRITICAL);
        throw new ServiceParameterErrorException(this, STORE_DIR_PARAMETER);
    }
}