public class SegmentChainId extends java.lang.Object implements SegmentId

| Modifier and Type | Class and Description |
|---|---|
class |
SegmentChainId.PrefetchJob |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SAFE_DISTANCE |
| Constructor and Description |
|---|
SegmentChainId(IdSegmentDistributor maxIdDistributor) |
SegmentChainId(long idSegmentTtl,
int safeDistance,
IdSegmentDistributor maxIdDistributor,
PrefetchWorkerExecutorService prefetchWorkerExecutorService) |
| Modifier and Type | Method and Description |
|---|---|
long |
generate()
Generate distributed ID.
|
IdSegmentChain |
getHead() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateAsString, idConverterpublic static final int DEFAULT_SAFE_DISTANCE
public SegmentChainId(IdSegmentDistributor maxIdDistributor)
public SegmentChainId(long idSegmentTtl,
int safeDistance,
IdSegmentDistributor maxIdDistributor,
PrefetchWorkerExecutorService prefetchWorkerExecutorService)
public IdSegmentChain getHead()
public long generate()
IdGeneratorgenerate in interface IdGenerator