Class 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
      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 WALListener getInstance()  
      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
    • Constructor Detail

      • WALListener

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

      • 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.