Class MemorySequence
- java.lang.Object
-
- org.cilogon.oauth2.servlet.storage.sequence.MemorySequence
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Initializable
,Incrementable
public class MemorySequence extends Object implements Incrementable
Simple in-memory sequence.Created by Jeff Gaynor
on 3/13/12 at 2:23 PM
-
-
Constructor Summary
Constructors Constructor Description MemorySequence()
MemorySequence(long startValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkDestroyed()
boolean
createNew()
boolean
createNew(long initialValue)
This takes the place (or should) ofInitializable.createNew()
and passes along the first value of the newly created sequence.boolean
destroy()
boolean
init()
boolean
isCreated()
boolean
isDestroyed()
boolean
isInitialized()
long
nextValue()
-
-
-
Method Detail
-
nextValue
public long nextValue()
- Specified by:
nextValue
in interfaceIncrementable
-
createNew
public boolean createNew(long initialValue)
Description copied from interface:Incrementable
This 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:
createNew
in interfaceIncrementable
- Returns:
-
destroy
public boolean destroy()
- Specified by:
destroy
in interfaceedu.uiuc.ncsa.security.core.Initializable
-
init
public boolean init()
- Specified by:
init
in interfaceedu.uiuc.ncsa.security.core.Initializable
-
createNew
public boolean createNew()
- Specified by:
createNew
in interfaceedu.uiuc.ncsa.security.core.Initializable
-
isCreated
public boolean isCreated()
- Specified by:
isCreated
in interfaceedu.uiuc.ncsa.security.core.Initializable
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitialized
in interfaceedu.uiuc.ncsa.security.core.Initializable
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed
in interfaceedu.uiuc.ncsa.security.core.Initializable
-
checkDestroyed
protected void checkDestroyed()
-
-