Package netscape.ldap

Class TTLTimer

java.lang.Object
netscape.ldap.TTLTimer
All Implemented Interfaces:
Runnable

class TTLTimer extends Object implements Runnable
Represents a timer which will timeout for every certain interval. It provides methods to start, stop, or restart timer.
  • Field Details

    • m_timeout

      private long m_timeout
    • m_cache

      private LDAPCache m_cache
    • t

      private Thread t
  • Constructor Details

    • TTLTimer

      TTLTimer(LDAPCache cache)
      Constructor with the specified timout.
      Parameters:
      timeout - the timeout value in milliseconds
  • Method Details

    • start

      void start(long timeout)
      (Re)start the timer.
    • stop

      void stop()
      Stop the timer.
    • run

      public void run()
      The runnable waits until the timeout period has elapsed. It then notify the registered listener who listens for the timeout event.
      Specified by:
      run in interface Runnable