Package io.eventuate.common.id
Class ApplicationIdGenerator
- java.lang.Object
-
- io.eventuate.common.id.ApplicationIdGenerator
-
- All Implemented Interfaces:
IdGenerator
public class ApplicationIdGenerator extends java.lang.Object implements IdGenerator
-
-
Constructor Summary
Constructors Constructor Description ApplicationIdGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandatabaseIdRequired()Int128genId(java.lang.Long databaseId, java.lang.Integer partitionOffset)Int128genIdInternal()java.util.Optional<Int128>incrementIdIfPossible(Int128 anchorId)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.eventuate.common.id.IdGenerator
genId, genIdAsString, genIdAsString
-
-
-
-
Method Detail
-
databaseIdRequired
public boolean databaseIdRequired()
- Specified by:
databaseIdRequiredin interfaceIdGenerator
-
genIdInternal
public Int128 genIdInternal()
-
genId
public Int128 genId(java.lang.Long databaseId, java.lang.Integer partitionOffset)
- Specified by:
genIdin interfaceIdGenerator
-
incrementIdIfPossible
public java.util.Optional<Int128> incrementIdIfPossible(Int128 anchorId)
- Specified by:
incrementIdIfPossiblein interfaceIdGenerator
-
-