Package me.ahoo.cosid.jdbc
Class JdbcIdSegmentDistributor
java.lang.Object
me.ahoo.cosid.jdbc.JdbcIdSegmentDistributor
- All Implemented Interfaces:
Grouped
,IdSegmentDistributor
Jdbc IdSegment Distributor.
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.ahoo.cosid.segment.IdSegmentDistributor
IdSegmentDistributor.Atomic, IdSegmentDistributor.Mock
-
Field Summary
Fields inherited from interface me.ahoo.cosid.segment.IdSegmentDistributor
DEFAULT_OFFSET, DEFAULT_SEGMENTS, DEFAULT_STEP
-
Constructor Summary
ConstructorDescriptionJdbcIdSegmentDistributor
(String namespace, String name, long step, String incrementMaxIdSql, String fetchMaxIdSql, DataSource dataSource) JdbcIdSegmentDistributor
(String namespace, String name, long step, DataSource dataSource) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.ahoo.cosid.segment.IdSegmentDistributor
allowReset, getNamespacedName, getStep, nextIdSegment, nextIdSegment, nextIdSegment, nextIdSegmentChain, nextIdSegmentChain, nextMaxId
-
Field Details
-
INCREMENT_MAX_ID_SQL
- See Also:
-
FETCH_MAX_ID_SQL
- See Also:
-
-
Constructor Details
-
JdbcIdSegmentDistributor
-
JdbcIdSegmentDistributor
public JdbcIdSegmentDistributor(String namespace, String name, long step, String incrementMaxIdSql, String fetchMaxIdSql, DataSource dataSource)
-
-
Method Details
-
getNamespace
- Specified by:
getNamespace
in interfaceIdSegmentDistributor
-
getName
- Specified by:
getName
in interfaceIdSegmentDistributor
-
getStep
public long getStep()- Specified by:
getStep
in interfaceIdSegmentDistributor
-
nextMaxId
public long nextMaxId(long step) - Specified by:
nextMaxId
in interfaceIdSegmentDistributor
-