Class WaitingThread


  • @Deprecated
    public class WaitingThread
    extends java.lang.Object
    Deprecated.
    (4.2) do not use
    Represents a thread waiting for a connection.

    This class implements throw away objects. It is instantiated whenever a thread needs to wait. Instances are not re-used, except if the waiting thread experiences a spurious wake up and continues to wait.

    All methods assume external synchronization on the condition passed to the constructor. Instances of this class do not synchronize access!

    Since:
    4.0
    • Constructor Summary

      Constructors 
      Constructor Description
      WaitingThread​(java.util.concurrent.locks.Condition cond, RouteSpecificPool pool)
      Deprecated.
      Creates a new entry for a waiting thread.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean await​(java.util.Date deadline)
      Deprecated.
      Blocks the calling thread.
      java.util.concurrent.locks.Condition getCondition()
      Deprecated.
      Obtains the condition.
      RouteSpecificPool getPool()
      Deprecated.
      Obtains the pool, if there is one.
      java.lang.Thread getThread()
      Deprecated.
      Obtains the thread, if there is one.
      void interrupt()
      Deprecated.
       
      void wakeup()
      Deprecated.
      Wakes up the waiting thread.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WaitingThread

        public WaitingThread​(java.util.concurrent.locks.Condition cond,
                             RouteSpecificPool pool)
        Deprecated.
        Creates a new entry for a waiting thread.
        Parameters:
        cond - the condition for which to wait
        pool - the pool on which the thread will be waiting, or null
    • Method Detail

      • getCondition

        public final java.util.concurrent.locks.Condition getCondition()
        Deprecated.
        Obtains the condition.
        Returns:
        the condition on which to wait, never null
      • getPool

        public final RouteSpecificPool getPool()
        Deprecated.
        Obtains the pool, if there is one.
        Returns:
        the pool on which a thread is or was waiting, or null
      • getThread

        public final java.lang.Thread getThread()
        Deprecated.
        Obtains the thread, if there is one.
        Returns:
        the thread which is waiting, or null
      • await

        public boolean await​(java.util.Date deadline)
                      throws java.lang.InterruptedException
        Deprecated.
        Blocks the calling thread. This method returns when the thread is notified or interrupted, if a timeout occurrs, or if there is a spurious wakeup.

        This method assumes external synchronization.

        Parameters:
        deadline - when to time out, or null for no timeout
        Returns:
        true if the condition was satisfied, false in case of a timeout. Typically, a call to wakeup() is used to indicate that the condition was satisfied. Since the condition is accessible outside, this cannot be guaranteed though.
        Throws:
        java.lang.InterruptedException - if the waiting thread was interrupted
        See Also:
        wakeup()
      • wakeup

        public void wakeup()
        Deprecated.
        Wakes up the waiting thread.

        This method assumes external synchronization.

      • interrupt

        public void interrupt()
        Deprecated.