HiveAtAccessLog class

Hive-backed implementation of AtAccessLog for the secondary server's audit trail (from, cram, pol, lookup, plookup, pkam).

Implemented types

Constructors

HiveAtAccessLog(HiveAccessLogKeyStore keyValueStore, {int compactionPercentage = 30})

Properties

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
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Drop every entry from the underlying box without closing it. Used by AtPersistenceBundle.clear for cheap test isolation.
close() Future<void>
Closes the accessLogKeyStore instance.
override
compact(bool dryRun) Stream<int>
Compact the access log. Drops the oldest compactionPercentage of entries by insertion order.
override
entriesCount() int
Total entry count. Used by operators / metrics; not on any hot path.
override
getLastAccessLogEntry() Future<AccessLogEntry>
Most-recent access-log entry, regardless of verb.
override
getLastPkamAccessLogEntry() Future<AccessLogEntry?>
Most-recent access-log entry whose verb is pkam.
override
getSize() int
Approximate on-disk size in bytes.
override
insert(String fromAtSign, String verbName, {String? lookupKey}) Future<int?>
Creates a new entry with fromAtSign, verbName and optional parameter lookupKey for lookup and plookup verbs. @param fromAtSign : The another user atsign @param verbName : The verb performed by the atsign user @param lookupKey : The optional parameter to hold lookup key when performing lookup or plookup verb.
override
iterate() Stream<AccessLogEntry>
Iterate every access-log entry in insertion order. Used by the persistence migrator to copy access-log content from one backend to another.
override
mostVisitedAtSigns(int length) Future<Map<String, int>>
Top length atSigns by access-log entry count. Result map: atSign → visit count, ordered by descending count.
override
mostVisitedKeys(int length) Future<Map<String, int>>
Top length lookup keys by access-log entry count. Result map: lookup-key → visit count, ordered by descending count.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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