public final class BatchingIDGenerator extends Object implements org.apache.activemq.artemis.utils.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 org.apache.activemq.artemis.core.journal.EncodingSupport |
createIDEncodingSupport(long id) |
void |
forceNextID(long nextID) |
long |
generateID() |
long |
getCurrentID() |
void |
loadState(long journalID,
org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer) |
void |
persistCurrentID() |
public BatchingIDGenerator(long start,
long checkpointSize,
StorageManager storageManager)
public void persistCurrentID()
public void cleanup()
public void loadState(long journalID,
org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer)
public void forceNextID(long nextID)
public long generateID()
generateID in interface org.apache.activemq.artemis.utils.IDGeneratorpublic long getCurrentID()
getCurrentID in interface org.apache.activemq.artemis.utils.IDGeneratorpublic static org.apache.activemq.artemis.core.journal.EncodingSupport createIDEncodingSupport(long id)
Copyright © 2023 The Apache Software Foundation. All rights reserved.