Class NotificationIndexCleanup

  • All Implemented Interfaces:
    java.lang.Runnable

    public class NotificationIndexCleanup
    extends java.lang.Object
    implements java.lang.Runnable
    NotificationIndexCleanup manages cleaning up expired notifications. Uses background thread to remove expired notifications while they exist, then uses wait/notify to pause until shutdown() or wakeUp() methods are called. NOTE: this class does not schedule periodic cleanup, and the wakeUp() method must be called periodically.
    • Method Detail

      • run

        public void run()
        Notification cleanup thread loop. This method blocks and should probably not be called by you.
        Specified by:
        run in interface java.lang.Runnable
      • startup

        public void startup()
                     throws java.lang.Exception
        Start cleanup process.
        Throws:
        java.lang.Exception
      • shutdown

        public void shutdown()
                      throws java.lang.Exception
        Stop cleanup process.
        Throws:
        java.lang.Exception
      • wakeUp

        public void wakeUp()
        Wake up the background thread if it is waiting.