QueuedCompactionEngine class
Concrete implementation of QueuedCompactionService.
Maintains an in-memory FIFO queue of session IDs pending compaction. Preemptive trigger fires at 80% of the token budget.
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
pendingQueue
→ List<
String> -
Returns an unmodifiable view of the current queue.
no setter
- processedCount → int
-
Returns the number of sessions processed so far.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
enqueue(
String sessionId) → void -
Marks a session for compaction by adding it to the processing queue.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processQueue(
) → int -
Processes all pending compactions in the queue.
override
-
shouldCompactPreemptively(
int currentTokens, int maxTokens) → bool -
Returns
trueif preemptive compaction should trigger.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited