Interface ModificationTracker

    • Method Detail

      • getInstance

        static ModificationTracker getInstance()
        The tracker singleton.
        Returns:
        the singleton
      • addModificationListener

        void addModificationListener​(ModificationListener listener)
        Adds a modification listener.
        Parameters:
        listener - the listener to add
      • removeModificationListener

        boolean removeModificationListener​(ModificationListener listener)
        Removes a modification listener.
        Parameters:
        listener - to remove
        Returns:
        true if removed
      • countModification

        long countModification​(Session session,
                               java.lang.String name)
        Counts the modification for a given name.
        Used to trigger modification events.
        Parameters:
        session - the session persisting the modification, null if threadlocal session
        name - a unique name to track modifications
        Returns:
        the modification serial
      • addShutdownRunnable

        void addShutdownRunnable​(java.lang.Runnable runnable)
        Registers a pure runnable to be executed if the pdo tracker is terminated due to severe errors.
        Parameters:
        runnable - the runnable
      • removeShutdownRunnable

        boolean removeShutdownRunnable​(java.lang.Runnable runnable)
        Unregisters a shutdown runnable.
        Parameters:
        runnable - the runnable
        Returns:
        true if runnable removed
      • getSerial

        long getSerial​(java.lang.Class<?> clazz)
        Gets the serial for a given class.
        Parameters:
        clazz - the tracked class
        Returns:
        the table serial
      • getSerial

        long getSerial​(java.lang.String name)
        Gets the serial for a given modification name.
        Parameters:
        name - the modification name
        Returns:
        the table serial
      • invalidate

        void invalidate()
        Invalidates the tracker.
        Forces the tracking info to be rebuilt.