ObjectPool class
Object Pool for Strategic Logger
Provides efficient object reuse to reduce memory allocations and garbage collection pressure for high-frequency logging operations.
Properties
- 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(
) → void - Clears all pools
-
dispose(
) → void - Disposes the object pool
-
getContextMap(
) → Map< String, dynamic> - Gets a context Map from the pool or creates a new one
-
getLogEntry(
{required LogLevel level, required String message, required DateTime timestamp, Map< String, Object> ? context, LogEvent? event}) → LogEntry - Gets a LogEntry from the pool or creates a new one
-
getLogEvent(
{required String eventName, required String eventMessage, required DateTime timestamp, Map< String, Object> ? context}) → LogEvent - Gets a LogEvent from the pool or creates a new one
-
getStats(
) → ObjectPoolStats - Gets pool statistics
-
getStringBuffer(
) → StringBuffer - Gets a StringBuffer from the pool or creates a new one
-
initialize(
) → void - Initializes the object pools
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
returnContextMap(
Map< String, dynamic> map) → void - Returns a context Map to the pool
-
returnLogEntry(
LogEntry entry) → void - Returns a LogEntry to the pool
-
returnLogEvent(
LogEvent event) → void - Returns a LogEvent to the pool
-
returnStringBuffer(
StringBuffer buffer) → void - Returns a StringBuffer to the pool
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → ObjectPool
-
no setter