public class SequentialUUIDHandleFactory extends UUIDHandleFactory
A handle factory that generates UUID persistent handles out of a base long
and an increment counter long
value. The base and the seed of the counter
can be set at construction time or at any later time. The base value goes into the higher
8 bytes of the UUID and the counter value goes into the lower 8 bytes.
I
Constructor and Description |
---|
SequentialUUIDHandleFactory() |
SequentialUUIDHandleFactory(long base,
long seed) |
Modifier and Type | Method and Description |
---|---|
long |
getBase() |
long |
getSeed() |
HGPersistentHandle |
makeHandle()
Construct and return a new, unique persistent handle.
|
void |
setBase(long base) |
void |
setSeed(long newSeed) |
anyHandle, linkTypeHandle, makeHandle, makeHandle, makeHandle, nullHandle, nullTypeHandle, subsumesTypeHandle, topTypeHandle
public SequentialUUIDHandleFactory()
public SequentialUUIDHandleFactory(long base, long seed)
public long getBase()
public void setBase(long base)
public long getSeed()
public void setSeed(long newSeed)
public HGPersistentHandle makeHandle()
HGHandleFactory
Construct and return a new, unique persistent handle. The handle is permanently unique. It can be persistent (serialized) and restored without ever conflicting with another handle.
makeHandle
in interface HGHandleFactory
makeHandle
in class UUIDHandleFactory
Copyright © 2015. All rights reserved.