Class OSequenceCached
java.lang.Object
com.orientechnologies.orient.core.metadata.sequence.OSequence
com.orientechnologies.orient.core.metadata.sequence.OSequenceCached
- Since:
- 3/3/2015
- Author:
- Matan Shukry (matanshukry@gmail.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class com.orientechnologies.orient.core.metadata.sequence.OSequence
OSequence.CreateParams, OSequence.SEQUENCE_TYPE -
Field Summary
Fields inherited from class com.orientechnologies.orient.core.metadata.sequence.OSequence
CLASS_NAME, DEF_MAX_RETRY, DEFAULT_CACHE, DEFAULT_INCREMENT, DEFAULT_LIMIT_VALUE, DEFAULT_ORDER_TYPE, DEFAULT_RECYCLABLE_VALUE, DEFAULT_START, replicationProtocolVersion, tlDocument -
Constructor Summary
ConstructorsConstructorDescriptionOSequenceCached(ODocument iDocument) OSequenceCached(ODocument iDocument, OSequence.CreateParams params) -
Method Summary
Modifier and TypeMethodDescriptionprotected longfinal intlongnext()protected longnextWithNewCurrentValue(long currentValue, boolean executeViaDistributed) longnextWork()longfinal voidsetCacheSize(int cacheSize) protected booleanMethods inherited from class com.orientechnologies.orient.core.metadata.sequence.OSequence
callRetry, current, getCrucialValueChanged, getDatabase, getDocument, getIncrement, getLimitValue, getMaxRetry, getName, getOrderType, getRecyclable, getSequenceName, getSequenceType, getStart, getValue, getValue, initClass, initSequence, isOnDistributted, onUpdate, reloadSequence, reset, save, save, setCrucialValueChanged, setIncrement, setLimitValue, setMaxRetry, setName, setOrderType, setRecyclable, setStart, setValue, updateParams
-
Constructor Details
-
OSequenceCached
public OSequenceCached() -
OSequenceCached
-
OSequenceCached
-
-
Method Details
-
nextWithNewCurrentValue
protected long nextWithNewCurrentValue(long currentValue, boolean executeViaDistributed) throws OSequenceLimitReachedException, ODatabaseException -
shouldGoOverDistrtibute
protected boolean shouldGoOverDistrtibute()- Overrides:
shouldGoOverDistrtibutein classOSequence
-
next
- Overrides:
nextin classOSequence- Throws:
OSequenceLimitReachedExceptionODatabaseException
-
nextWork
- Specified by:
nextWorkin classOSequence- Throws:
OSequenceLimitReachedException
-
currentWork
protected long currentWork()- Specified by:
currentWorkin classOSequence
-
resetWork
public long resetWork() -
getSequenceType
- Specified by:
getSequenceTypein classOSequence
-
getCacheSize
public final int getCacheSize() -
setCacheSize
public final void setCacheSize(int cacheSize)
-