HiveAtCommitLog class
Hive-backed implementation of AtCommitLog for the server side.
- Inheritance
-
- Object
- AtCommitLog
- HiveAtCommitLog
- 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
AtSecondaryConfigat 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
HiveServerCommitLogKeyStoreinstance.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
HiveCompactionStrategyused 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
commitIdstill retained in the log, ornullif the log is empty. SeeHiveCommitLogKeyStore.firstCommitIdfor 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
commitIdorder. IffromCommitIdis provided, yields only entries withcommitId >= fromCommitId. Ifwhereis provided, only entries for whichwhere(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
entryunder its existingcommitIdWITHOUT 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