Class OSequence
java.lang.Object
com.orientechnologies.orient.core.metadata.sequence.OSequence
- Direct Known Subclasses:
OSequenceCached,OSequenceOrdered
- Since:
- 3/2/2015
- Author:
- Matan Shukry (matanshukry@gmail.com)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected static final intstatic final intstatic final intstatic final Longstatic final SequenceOrderTypestatic final booleanstatic final longprotected static intprotected ThreadLocal<ODocument> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> Tlongcurrent()protected abstract longprotected booleanprotected final ODatabaseDocumentInternalfinal ODocumentprotected intprotected LongintgetName()protected SequenceOrderTypebooleanstatic StringgetSequenceName(ODocument iDocument) abstract OSequence.SEQUENCE_TYPEstatic OSequence.SEQUENCE_TYPEgetSequenceType(ODocument document) protected longgetStart()protected longgetValue()protected static Longstatic voidinitClass(OClassImpl sequenceClass) protected final voidinitSequence(OSequence.CreateParams params) protected booleanlongnext()abstract longnextWork()voidprotected voidlongreset()abstract longvoidsave()voidsave(ODatabaseDocument database) protected voidsetCrucialValueChanged(boolean val) protected voidsetIncrement(int value) protected voidsetLimitValue(Long limitValue) voidsetMaxRetry(int maxRetry) protected voidsetOrderType(SequenceOrderType orderType) voidsetRecyclable(boolean recyclable) protected voidsetStart(long value) protected voidsetValue(long value) protected booleanbooleanupdateParams(OSequence.CreateParams params)
-
Field Details
-
DEFAULT_START
public static final long DEFAULT_START- See Also:
-
DEFAULT_INCREMENT
public static final int DEFAULT_INCREMENT- See Also:
-
DEFAULT_CACHE
public static final int DEFAULT_CACHE- See Also:
-
DEFAULT_LIMIT_VALUE
-
DEFAULT_RECYCLABLE_VALUE
public static final boolean DEFAULT_RECYCLABLE_VALUE- See Also:
-
DEF_MAX_RETRY
protected static final int DEF_MAX_RETRY -
CLASS_NAME
- See Also:
-
tlDocument
-
DEFAULT_ORDER_TYPE
-
replicationProtocolVersion
protected static int replicationProtocolVersion
-
-
Constructor Details
-
OSequence
protected OSequence() -
OSequence
-
OSequence
-
-
Method Details
-
setCrucialValueChanged
protected void setCrucialValueChanged(boolean val) -
getCrucialValueChanged
protected boolean getCrucialValueChanged() -
save
public void save() -
save
-
getDocument
-
initSequence
-
shouldGoOverDistrtibute
protected boolean shouldGoOverDistrtibute() -
updateParams
- Throws:
ODatabaseException
-
isOnDistributted
protected boolean isOnDistributted() -
onUpdate
-
getValue
-
getValue
protected long getValue() -
setValue
protected void setValue(long value) -
getIncrement
protected int getIncrement() -
setLimitValue
-
getLimitValue
-
setOrderType
-
getOrderType
-
setIncrement
protected void setIncrement(int value) -
getStart
protected long getStart() -
setStart
protected void setStart(long value) -
getMaxRetry
public int getMaxRetry() -
setMaxRetry
public void setMaxRetry(int maxRetry) -
getName
-
setName
-
getRecyclable
public boolean getRecyclable() -
setRecyclable
public void setRecyclable(boolean recyclable) -
getDatabase
-
getSequenceName
-
getSequenceType
-
initClass
-
next
-
nextWork
- Throws:
OSequenceLimitReachedException
-
current
- Throws:
ODatabaseException
-
currentWork
protected abstract long currentWork() -
reset
- Throws:
ODatabaseException
-
resetWork
public abstract long resetWork() -
getSequenceType
-
reloadSequence
protected void reloadSequence() -
callRetry
-