HiveAtCommitLog class

Hive-backed implementation of AtCommitLog for the server side.

Inheritance
Annotations

Constructors

HiveAtCommitLog(HiveCommitLogKeyStore keyValueStore, {int compactionPercentage = 30})

Properties

commitLogKeyStore → HiveCommitLogKeyStore
no setter
compactionPercentage int
Per-pass percentage of entries to drop when compaction is invoked. Captured from AtSecondaryConfig at factory time; immutable per instance.
final
hashCode int
The hash code for this object.
no setterinherited
logger ↔ AtSignLogger
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Closes the HiveServerCommitLogKeyStore instance.
override
commit(String key, CommitOp operation) Future<int?>
Creates a new entry with key, operation and adds to the commit log with key - commitId and value - CommitEntry returns the sequence number corresponding to the new commit throws DataStoreException if there is an exception writing to hive box
override
compact(bool dryRun) Stream<int>
Compact the commit log. The Hive impl prunes duplicate entries (same atKey, older commitId) — the same algorithm HiveCompactionStrategy used to drive externally.
override
entriesCount() int
Returns the total number of keys @return - int : Returns number of keys in access log
override
firstCommittedSequenceNumber() int?
Smallest commitId still retained in the log, or null if the log is empty. See HiveCommitLogKeyStore.firstCommitId for why the box read is correct.
override
getLatestCommitEntry(String key) CommitEntry?
Returns the latest commitEntry of the key.
override
getSize() int
Approximate on-disk size in bytes.
override
iterate({int? fromCommitId, bool where(CommitEntry)?}) Stream<CommitEntry>
Iterate every commit entry in commitId order. If fromCommitId is provided, yields only entries with commitId >= fromCommitId. If where is provided, only entries for which where(entry) returns true are yielded; the rest are silently skipped. Used by sync, by migration, and by anything that needs full-log traversal.
override
lastCommittedSequenceNumber() int?
Returns the latest committed sequence number
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replay(CommitEntry entry) Future<void>
Replay entry under its existing commitId WITHOUT firing change-event listeners. Used by the persistence migrator to copy commit-log content from one backend to another while preserving sync identity. Idempotent on (commitId, atKey, operation).
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited