Package one.microstream.storage.types
Interface StorageEventLogger
- All Known Implementing Classes:
StorageEventLogger.Debug
,StorageEventLogger.Default
,StorageEventLogger.NoOp
public interface StorageEventLogger
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
StorageEventLogger.Debug
Debug implementation of StorageEventLogger This implementation logs behavior and exceptionsstatic class
StorageEventLogger.Default
Default implementation of StorageEventLogger This implementation doesn't log behavior but logs exceptionsstatic class
StorageEventLogger.NoOp
NoOp StorageEventLogger Doesn't log any storage events -
Method Summary
Modifier and Type Method Description static StorageEventLogger
Debug()
Creates a Debug StorageEventLogger thats prints to the console.static StorageEventLogger
Debug(Consumer<? super String> messageConsumer)
Creates a Debug StorageEventLogger forwards its output to the supplied Consumerstatic StorageEventLogger
Default()
Creates a Default StorageEventLogger thats prints to the console.static StorageEventLogger
Default(Consumer<? super String> messageConsumer)
Creates a Default StorageEventLogger that forwards its output to the supplied Consumerdefault void
logChannelProcessingDisabled(StorageChannel channel)
default void
logChannelStoppedWorking(StorageChannel channel)
default void
logDisruption(StorageChannel channel, Throwable t)
Note that not all Throwables are Exceptions.default void
logGarbageCollectorCompleted(long gcColdGeneration, long lastGcColdCompletion)
default void
logGarbageCollectorCompletedHotPhase(long gcHotGeneration, long lastGcHotCompletion)
default void
logGarbageCollectorEncounteredZombieObjectId(long objectId)
default void
logGarbageCollectorNotNeeded()
default void
logGarbageCollectorSweepingComplete(StorageEntityCache<?> entityCache)
default void
logLiveCheckComplete(StorageEntityCache<?> entityCache)
static StorageEventLogger
NoOp()
Creates a NoOp StorageEventLogger that does really nothing.
-
Method Details
-
logChannelProcessingDisabled
-
logChannelStoppedWorking
-
logDisruption
Note that not all Throwables are Exceptions. There are also Errors. And not all exceptions are problems. There are also program execution control vehicles likeInterruptedException
. The actually fitting common term is "Disruption". Throwable is a very low-level technical, compiler-oriented expression.- Parameters:
channel
-t
-
-
logLiveCheckComplete
-
logGarbageCollectorSweepingComplete
-
logGarbageCollectorNotNeeded
default void logGarbageCollectorNotNeeded() -
logGarbageCollectorCompletedHotPhase
default void logGarbageCollectorCompletedHotPhase(long gcHotGeneration, long lastGcHotCompletion) -
logGarbageCollectorCompleted
default void logGarbageCollectorCompleted(long gcColdGeneration, long lastGcColdCompletion) -
logGarbageCollectorEncounteredZombieObjectId
default void logGarbageCollectorEncounteredZombieObjectId(long objectId) -
NoOp
Creates a NoOp StorageEventLogger that does really nothing.- Returns:
- a StorageEventLogger.NoOp instance
-
Default
Creates a Default StorageEventLogger thats prints to the console.- Returns:
- a StorageEventLogger.Default instance
-
Default
Creates a Default StorageEventLogger that forwards its output to the supplied Consumer- Parameters:
messageConsumer
- a Consumer that processes the forwarded log messages- Returns:
- a StorageEventLogger.Default instance
-
Debug
Creates a Debug StorageEventLogger thats prints to the console.- Returns:
- a StorageEventLogger.Debug instance
-
Debug
Creates a Debug StorageEventLogger forwards its output to the supplied Consumer- Parameters:
messageConsumer
- a Consumer that processes the forwarded log messages- Returns:
- a StorageEventLogger.Debug instance
-