Package java.util.concurrent

Examples of java.util.concurrent.Delayed


        int readyCount;

        // If there are any pending timeouts, block no longer than
        // the earliest.  Otherwise, block indefinitely.
        final Delayed nextExpiringTask = timeouts.peek();
        if (nextExpiringTask == null) {
            readyCount = selector.select();
        } else {
            long nextTimeoutMillis =
                nextExpiringTask.getDelay(TimeUnit.MILLISECONDS);
            if (nextTimeoutMillis <= 0) {
                readyCount = selector.selectNow();
            } else {
                readyCount = selector.select(nextTimeoutMillis);
            }
View Full Code Here


        return true;
      }
      if (obj == null || getClass() != obj.getClass()) {
        return false;
      }
      Delayed other = (Delayed) obj;
      return compareTo(other) == 0;
    }
View Full Code Here

        return true;
      }
      if (obj == null || getClass() != obj.getClass()) {
        return false;
      }
      Delayed other = (Delayed) obj;
      return compareTo(other) == 0;
    }
View Full Code Here

        return true;
      }
      if (obj == null || getClass() != obj.getClass()) {
        return false;
      }
      Delayed other = (Delayed) obj;
      return compareTo(other) == 0;
    }
View Full Code Here

        return true;
      }
      if (obj == null || getClass() != obj.getClass()) {
        return false;
      }
      Delayed other = (Delayed) obj;
      return compareTo(other) == 0;
    }
View Full Code Here

        return true;
      }
      if (obj == null || getClass() != obj.getClass()) {
        return false;
      }
      Delayed other = (Delayed) obj;
      return compareTo(other) == 0;
    }
View Full Code Here

        return true;
      }
      if (obj == null || getClass() != obj.getClass()) {
        return false;
      }
      Delayed other = (Delayed) obj;
      return compareTo(other) == 0;
    }
View Full Code Here

        int readyCount;

        // If there are any pending timeouts, block no longer than
        // the earliest.  Otherwise, block indefinitely.
        final Delayed nextExpiringTask = timeouts.peek();
        if (nextExpiringTask == null) {
            readyCount = selector.select();
        } else {
            long nextTimeoutMillis =
                nextExpiringTask.getDelay(TimeUnit.MILLISECONDS);
            if (nextTimeoutMillis <= 0) {
                readyCount = selector.selectNow();
            } else {
                readyCount = selector.select(nextTimeoutMillis);
            }
View Full Code Here

        return true;
      }
      if (obj == null || getClass() != obj.getClass()) {
        return false;
      }
      Delayed other = (Delayed) obj;
      return compareTo(other) == 0;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.archive.crawler.frontier.AbstractFrontier#getMaxInWait()
     */
    @Override
    protected long getMaxInWait() {
        Delayed next = snoozedClassQueues.peek();
        return next == null ? 60000 : next.getDelay(TimeUnit.MILLISECONDS);
    }
View Full Code Here

TOP

Related Classes of java.util.concurrent.Delayed

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.