Package com.helger.dao.wal
Class WALListener
- java.lang.Object
-
- com.helger.scope.singleton.AbstractSingleton
-
- com.helger.scope.singleton.AbstractGlobalSingleton
-
- com.helger.dao.wal.WALListener
-
- All Implemented Interfaces:
com.helger.scope.IScopeDestructionAware
public final class WALListener extends com.helger.scope.singleton.AbstractGlobalSingletonThe global write ahead logging manager that schedules future writings of a DAO.- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description WALListener()Deprecated.Called via reflection - don't call it yourself
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WALListenergetInstance()protected voidonDestroy(com.helger.scope.IScope aScopeInDestruction)voidregisterForLaterWriting(AbstractWALDAO<?> aDAO, String sWALFilename, Duration aWaitingWime)This is the main method for registration of later writing.-
Methods inherited from class com.helger.scope.singleton.AbstractGlobalSingleton
getAllGlobalSingletons, getGlobalSingleton, getGlobalSingletonIfInstantiated, isGlobalSingletonInstantiated
-
Methods inherited from class com.helger.scope.singleton.AbstractSingleton
getAllSingletons, getSingleton, getSingletonIfInstantiated, getSingletonScopeKey, isDestroyed, isInDestruction, isInInstantiation, isInPreDestruction, isInstantiated, isSingletonInstantiated, isUsableObject, onAfterInstantiation, onBeforeDestroy, onBeforeScopeDestruction, onScopeDestruction, readAbstractSingletonFields, setDestroyed, setInDestruction, setInInstantiation, setInPreDestruction, setInstantiated, toString, writeAbstractSingletonFields
-
-
-
-
Constructor Detail
-
WALListener
@Deprecated(forRemoval=false) @UsedViaReflection public WALListener()
Deprecated.Called via reflection - don't call it yourselfConstructor
-
-
Method Detail
-
getInstance
@Nonnull public static WALListener getInstance()
-
onDestroy
protected void onDestroy(@Nonnull com.helger.scope.IScope aScopeInDestruction)
- Overrides:
onDestroyin classcom.helger.scope.singleton.AbstractSingleton
-
registerForLaterWriting
public void registerForLaterWriting(@Nonnull AbstractWALDAO<?> aDAO, @Nonnull String sWALFilename, @Nonnull Duration aWaitingWime)
This is the main method for registration of later writing.- Parameters:
aDAO- The DAO to be writtensWALFilename- The filename of the WAL file for later deletion (in case the filename changes over time).aWaitingWime- The time to wait, until the file is physically written. May not benull.
-
-