public class MetadataStoreOffsetManager extends AbstractOffsetManager
OffsetManager that persists offsets into a MetadataStore.connectionFactory, consumerId, highestUpdatedOffsets, initialOffsets, log, referenceTimestamp| Constructor and Description |
|---|
MetadataStoreOffsetManager(ConnectionFactory connectionFactory) |
MetadataStoreOffsetManager(ConnectionFactory connectionFactory,
java.util.Map<Partition,java.lang.Long> initialOffsets) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected java.lang.Long |
doGetOffset(Partition partition) |
protected void |
doRemoveOffset(Partition partition) |
protected void |
doUpdateOffset(Partition partition,
long offset) |
void |
flush() |
java.lang.String |
generateKey(Partition partition) |
void |
setMetadataStore(org.springframework.integration.metadata.MetadataStore metadataStore)
The backing
MetadataStore for storing offsets. |
deleteOffset, destroy, getConsumerId, getOffset, resetOffsets, setConsumerId, setReferenceTimestamp, updateOffsetpublic MetadataStoreOffsetManager(ConnectionFactory connectionFactory)
public MetadataStoreOffsetManager(ConnectionFactory connectionFactory, java.util.Map<Partition,java.lang.Long> initialOffsets)
public void setMetadataStore(org.springframework.integration.metadata.MetadataStore metadataStore)
MetadataStore for storing offsets.metadataStore - a fully configured MetadataStore instancepublic void close()
throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
java.io.IOExceptionprotected void doUpdateOffset(Partition partition, long offset)
doUpdateOffset in class AbstractOffsetManagerprotected void doRemoveOffset(Partition partition)
doRemoveOffset in class AbstractOffsetManagerprotected java.lang.Long doGetOffset(Partition partition)
doGetOffset in class AbstractOffsetManagerpublic java.lang.String generateKey(Partition partition)