Class ExpirationTimer

  • All Implemented Interfaces:
    Runnable

    public class ExpirationTimer
    extends Thread
    Facilitates cleaning up resources associated with chunking/sequencing logic.
    • Constructor Detail

      • ExpirationTimer

        public ExpirationTimer​(long aTimeout,
                               HashMap aMap,
                               String aKey,
                               CPMEngine aCpm)
        Constructs a Timer that expires after a given interval. It keeps the map from growing indefinitely. Its main purpose is to remove entries from a given map using a provided key.
    • Method Detail

      • run

        public void run()
        Sleeps until a given timeout occurs. When awaken this timer deletes an entry in the shared HashMap using provided key. The map holds docId's that have been split into chunks.
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread