Class SequenceService
java.lang.Object
org.jumpmind.symmetric.service.impl.AbstractService
org.jumpmind.symmetric.service.impl.SequenceService
- All Implemented Interfaces:
ISequenceService,IService
-
Field Summary
Fields inherited from class org.jumpmind.symmetric.service.impl.AbstractService
log, parameterService, platform, sqlTemplate, sqlTemplateDirty, symmetricDialect, tablePrefix -
Constructor Summary
ConstructorsConstructorDescriptionSequenceService(IParameterService parameterService, ISymmetricDialect symmetricDialect) -
Method Summary
Modifier and TypeMethodDescriptionvoidlonglongcurrVal(ISqlTransaction transaction, String name) protected Sequenceget(ISqlTransaction transaction, String name) getAll()protected SequencegetSequenceDefinition(String name) protected SequencegetSequenceDefinition(ISqlTransaction transaction, String name) voidinit()longlongnextRange(ISqlTransaction transaction, String name, long size) Obtain a contiguous range of sequence numbers.longlongnextVal(ISqlTransaction transaction, String name) protected longnextValFromCache(ISqlTransaction transaction, String name) protected longnextValFromDatabase(String name, long size) protected longnextValFromDatabase(ISqlTransaction transaction, String name, long size) protected longtryToGetNextVal(ISqlTransaction transaction, String name, long size) Methods inherited from class org.jumpmind.symmetric.service.impl.AbstractService
assertNotNull, buildBatchOrderBy, buildBatchParams, buildBatchWhere, buildBatchWhereFromFilter, close, createSqlReplacementTokens, getJdbcTemplate, getParameterService, getSql, getSymmetricDialect, getTablePrefix, getTargetDialect, getTargetPlatform, getTargetPlatform, isCalledFromSymmetricAdminTool, isSet, isStreamClosedByClient, isSymmetricTable, logOnce, maxDate, readAcks, sendAck, setSqlMap, synchronize, toNodeIds, toNodeIds
-
Constructor Details
-
SequenceService
-
-
Method Details
-
init
public void init()- Specified by:
initin interfaceISequenceService
-
nextVal
- Specified by:
nextValin interfaceISequenceService
-
nextVal
- Specified by:
nextValin interfaceISequenceService
-
nextValFromCache
-
nextValFromDatabase
-
nextValFromDatabase
-
tryToGetNextVal
-
nextRange
Obtain a contiguous range of sequence numbers. The initial load extract in background needs an uninterrupted range of batch numbers. As a bonus, it's more efficient to request the entire range in one call.- Specified by:
nextRangein interfaceISequenceService- Parameters:
name- Sequence name to usesize- Number of sequence numbers to obtain- Returns:
- Starting sequence number for the entire range that was obtained
-
nextRange
- Specified by:
nextRangein interfaceISequenceService
-
getSequenceDefinition
-
getSequenceDefinition
-
currVal
- Specified by:
currValin interfaceISequenceService
-
currVal
- Specified by:
currValin interfaceISequenceService
-
create
- Specified by:
createin interfaceISequenceService
-
get
-
getAll
-