Class WaitQueue.Standard

java.lang.Object
org.apache.cassandra.utils.concurrent.WaitQueue.Standard
All Implemented Interfaces:
WaitQueue
Enclosing interface:
WaitQueue

public static class WaitQueue.Standard extends Object implements WaitQueue
  • Constructor Details

    • Standard

      protected Standard()
  • Method Details

    • register

      public WaitQueue.Signal register()
      The calling thread MUST be the thread that uses the signal
      Specified by:
      register in interface WaitQueue
      Returns:
      x
    • register

      public <V> WaitQueue.Signal register(V supplyOnDone, Consumer<V> receiveOnDone)
      The calling thread MUST be the thread that uses the signal. If the Signal is waited on, context.stop() will be called when the wait times out, the Signal is signalled, or the waiting thread is interrupted.
      Specified by:
      register in interface WaitQueue
    • signal

      public boolean signal()
      Signal one waiting thread
      Specified by:
      signal in interface WaitQueue
    • signalAll

      public void signalAll()
      Signal all waiting threads
      Specified by:
      signalAll in interface WaitQueue
    • hasWaiters

      public boolean hasWaiters()
      Description copied from interface: WaitQueue
      getWaiting() > 0
      Specified by:
      hasWaiters in interface WaitQueue
    • getWaiting

      public int getWaiting()
      Description copied from interface: WaitQueue
      Return how many threads are waiting
      Specified by:
      getWaiting in interface WaitQueue
      Returns:
      how many threads are waiting