Class ExpirationTimer

java.lang.Object
java.lang.Thread
org.apache.uima.collection.impl.cpm.utils.ExpirationTimer
All Implemented Interfaces:
Runnable

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

    • 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.
      Parameters:
      aTimeout - the a timeout
      aMap - the a map
      aKey - the a key
      aCpm - the a cpm
  • Method Details

    • 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