@Internal public interface StateChangelogWriter<Handle extends StateChangelogHandle<?>> extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
append(int keyGroup,
byte[] value)
Appends the provided data to this log.
|
void |
close()
Close this log.
|
void |
confirm(SequenceNumber from,
SequenceNumber to)
Mark the given state changes as confirmed by the JM.
|
SequenceNumber |
lastAppendedSequenceNumber()
Get
SequenceNumber of the last element added by append . |
CompletableFuture<Handle> |
persist(SequenceNumber from)
Durably persist previously
appended data starting from the
provided SequenceNumber and up to the latest change added. |
void |
reset(SequenceNumber from,
SequenceNumber to)
Reset the state the given state changes.
|
void |
truncate(SequenceNumber to)
Truncate this state changelog to free up resources.
|
SequenceNumber lastAppendedSequenceNumber()
SequenceNumber
of the last element added by append
.void append(int keyGroup, byte[] value)
CompletableFuture<Handle> persist(SequenceNumber from) throws IOException
appended
data starting from the
provided SequenceNumber
and up to the latest change added. After this call, one of
confirm
, reset
, or truncate
eventually must be
called for the corresponding change set. with reset/truncate/confirm methods?from
- inclusiveIOException
void truncate(SequenceNumber to)
persisted
state changes will be discarded unless previously
confirmed
.to
- exclusivevoid confirm(SequenceNumber from, SequenceNumber to)
from
- inclusiveto
- exclusivevoid reset(SequenceNumber from, SequenceNumber to)
void close()
close
in interface AutoCloseable
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.