Package de.caluga.morphium
Class Sequence
- java.lang.Object
-
- de.caluga.morphium.Sequence
-
public class Sequence extends Object
User: Stephan Bösebeck Date: 24.07.12 Time: 21:49 Sequence: Used by SequenceGenerator to crate unique sequential numbers. Locking and such is done by the Generator ReadPreference: MasterOnly and SavetyLevel=WAIT_FOR_SLAVE means: read only from master, but wait for one slave to commit the write. This is best compromise between performance and security (as usually you'd call nextValue on the generator, not getcurrentvalue all the time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSequence.Fields
-
Constructor Summary
Constructors Constructor Description Sequence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LonggetCurrentValue()longgetLockedAt()StringgetLockedBy()StringgetName()voidsetCurrentValue(Long currentValue)voidsetLockedAt(long lockedAt)voidsetLockedBy(String lockedBy)voidsetName(String name)StringtoString()
-
-
-
Method Detail
-
getLockedAt
public long getLockedAt()
-
setLockedAt
public void setLockedAt(long lockedAt)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getCurrentValue
public Long getCurrentValue()
-
setCurrentValue
public void setCurrentValue(Long currentValue)
-
getLockedBy
public String getLockedBy()
-
setLockedBy
public void setLockedBy(String lockedBy)
-
-