Class WorkerPool.WaitingSynchronousQueue

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.Runnable>, java.util.Collection<java.lang.Runnable>, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.Queue<java.lang.Runnable>
    Enclosing class:
    WorkerPool

    private static final class WorkerPool.WaitingSynchronousQueue
    extends java.util.concurrent.SynchronousQueue<java.lang.Runnable>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) long queueTime  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean offer​(java.lang.Runnable r)  
      (package private) void setQueueTime​(long queueTime)  
      • Methods inherited from class java.util.concurrent.SynchronousQueue

        clear, contains, containsAll, drainTo, drainTo, isEmpty, iterator, offer, peek, poll, poll, put, remainingCapacity, remove, removeAll, retainAll, size, spliterator, take, toArray, toArray, toString
      • Methods inherited from class java.util.AbstractQueue

        add, addAll, element, remove
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.concurrent.BlockingQueue

        add
      • Methods inherited from interface java.util.Collection

        addAll, equals, hashCode, parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Queue

        element, remove
    • Field Detail

      • queueTime

        volatile long queueTime
    • Constructor Detail

      • WaitingSynchronousQueue

        WaitingSynchronousQueue​(long queueTime)
    • Method Detail

      • setQueueTime

        void setQueueTime​(long queueTime)
      • offer

        public boolean offer​(java.lang.Runnable r)
        Specified by:
        offer in interface java.util.concurrent.BlockingQueue<java.lang.Runnable>
        Specified by:
        offer in interface java.util.Queue<java.lang.Runnable>
        Overrides:
        offer in class java.util.concurrent.SynchronousQueue<java.lang.Runnable>