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.AbstractGlobalSingleton
The global write ahead logging manager that schedules future writings of a DAO.
Author:
Philip Helger
  • Field Summary

    Fields inherited from class com.helger.scope.singleton.AbstractSingleton

    m_aRWLock
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    Called via reflection - don't call it yourself
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected void
    onDestroy(com.helger.scope.IScope aScopeInDestruction)
     
    void
    registerForLaterWriting(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • WALListener

      @Deprecated(forRemoval=false) @UsedViaReflection public WALListener()
      Deprecated.
      Called via reflection - don't call it yourself
      Constructor
  • Method Details

    • getInstance

      @Nonnull public static WALListener getInstance()
    • onDestroy

      protected void onDestroy(@Nonnull com.helger.scope.IScope aScopeInDestruction)
      Overrides:
      onDestroy in class com.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 written
      sWALFilename - 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 be null.