public final class BatchingIDGenerator extends Object implements IDGenerator
checkpointSize
and records the ID
in the journal only when starting a new batch.IDGenerator
Modifier and Type | Class and Description |
---|---|
protected static class |
BatchingIDGenerator.IDCounterEncoding |
Constructor and Description |
---|
BatchingIDGenerator(long start,
long checkpointSize,
StorageManager storageManager) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
A method to cleanup old records after started
|
static EncodingSupport |
createIDEncodingSupport(long id) |
void |
forceNextID(long nextID) |
long |
generateID() |
long |
getCurrentID() |
void |
loadState(long journalID,
ActiveMQBuffer buffer) |
void |
persistCurrentID() |
public BatchingIDGenerator(long start, long checkpointSize, StorageManager storageManager)
public void persistCurrentID()
public void cleanup()
public void loadState(long journalID, ActiveMQBuffer buffer)
public void forceNextID(long nextID)
public long generateID()
generateID
in interface IDGenerator
public long getCurrentID()
getCurrentID
in interface IDGenerator
public static EncodingSupport createIDEncodingSupport(long id)
Copyright © 2019 JBoss by Red Hat. All rights reserved.