Class FSSequence
- java.lang.Object
-
- org.apache.commons.transaction.file.FileSequence
-
- org.cilogon.oauth2.servlet.storage.sequence.FSSequence
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Initializable,Incrementable
public class FSSequence extends org.apache.commons.transaction.file.FileSequence implements Incrementable
Simple extension to Apache's file sequence.Created by Jeff Gaynor
on 3/8/12 at 10:58 AM
-
-
Field Summary
Fields Modifier and Type Field Description static LongDEFAULT_SEQUENCE_INCREMENTstatic StringDEFAULT_SEQUENCE_NAME
-
Constructor Summary
Constructors Constructor Description FSSequence(String storeDir, org.apache.commons.transaction.util.LoggerFacade logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckDestroyed()booleancreateNew()booleancreateNew(long initialValue)This takes the place (or should) ofInitializable.createNew()and passes along the first value of the newly created sequence.booleandestroy()booleaninit()booleanisCreated()booleanisDestroyed()booleanisInitialized()longnextValue()
-
-
-
Field Detail
-
DEFAULT_SEQUENCE_NAME
public static final String DEFAULT_SEQUENCE_NAME
- See Also:
- Constant Field Values
-
DEFAULT_SEQUENCE_INCREMENT
public static final Long DEFAULT_SEQUENCE_INCREMENT
-
-
Constructor Detail
-
FSSequence
public FSSequence(String storeDir, org.apache.commons.transaction.util.LoggerFacade logger) throws org.apache.commons.transaction.file.ResourceManagerException
- Throws:
org.apache.commons.transaction.file.ResourceManagerException
-
-
Method Detail
-
nextValue
public long nextValue()
- Specified by:
nextValuein interfaceIncrementable
-
createNew
public boolean createNew()
- Specified by:
createNewin interfaceedu.uiuc.ncsa.security.core.Initializable
-
createNew
public boolean createNew(long initialValue)
Description copied from interface:IncrementableThis takes the place (or should) ofInitializable.createNew()and passes along the first value of the newly created sequence. Using this method without a value takes whatever the underlying implementation deems fit for a first value should be.- Specified by:
createNewin interfaceIncrementable- Returns:
-
destroy
public boolean destroy()
- Specified by:
destroyin interfaceedu.uiuc.ncsa.security.core.Initializable
-
init
public boolean init()
- Specified by:
initin interfaceedu.uiuc.ncsa.security.core.Initializable
-
isCreated
public boolean isCreated()
- Specified by:
isCreatedin interfaceedu.uiuc.ncsa.security.core.Initializable
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitializedin interfaceedu.uiuc.ncsa.security.core.Initializable
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfaceedu.uiuc.ncsa.security.core.Initializable
-
checkDestroyed
protected void checkDestroyed()
-
-