org.apache.solr.cloud

## Class OverseerTaskQueue

- java.lang.Object
- - org.apache.solr.cloud.DistributedQueue
  - - org.apache.solr.cloud.OverseerTaskQueue

-     public class OverseerTaskQueue
      extends DistributedQueue

  A `DistributedQueue` augmented with helper methods specific to the overseer task queues. Methods specific to this subclass ignore superclass internal state and hit ZK directly. This is inefficient! But the API on this class is kind of muddy..

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `OverseerTaskQueue.QueueEvent`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OverseerTaskQueue(SolrZkClient zookeeper, String dir)`
    `OverseerTaskQueue(SolrZkClient zookeeper, String dir, Overseer.Stats stats)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsTaskWithRequestId(String requestIdKey, String requestId)` Returns true if the queue contains a task with the specified async id.
    `String` | `getTailId()` Gets last element of the Queue without removing it.
    `OverseerTaskQueue.QueueEvent` | `offer(byte[] data, long timeout)` Offer the data and wait for the response
    `List<OverseerTaskQueue.QueueEvent>` | `peekTopN(int n, Predicate<String> excludeSet, long waitMillis)`
    `void` | `remove(OverseerTaskQueue.QueueEvent event)` Remove the event and save the response into the other path.

    - ### Methods inherited from class org.apache.solr.cloud.DistributedQueue

      `getStats, offer, peek, peek, peek, poll, remove, take`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### OverseerTaskQueue

          public OverseerTaskQueue(SolrZkClient zookeeper,
                                   String dir)

    - #### OverseerTaskQueue

          public OverseerTaskQueue(SolrZkClient zookeeper,
                                   String dir,
                                   Overseer.Stats stats)

  - ### Method Detail

    - #### containsTaskWithRequestId

          public boolean containsTaskWithRequestId(String requestIdKey,
                                                   String requestId)
                                            throws org.apache.zookeeper.KeeperException,
                                                   InterruptedException

      Returns true if the queue contains a task with the specified async id.
      Throws:
        `org.apache.zookeeper.KeeperException`
        `InterruptedException`

    - #### remove

          public void remove(OverseerTaskQueue.QueueEvent event)
                      throws org.apache.zookeeper.KeeperException,
                             InterruptedException

      Remove the event and save the response into the other path.
      Throws:
        `org.apache.zookeeper.KeeperException`
        `InterruptedException`

    - #### offer

          public OverseerTaskQueue.QueueEvent offer(byte[] data,
                                                    long timeout)
                                             throws org.apache.zookeeper.KeeperException,
                                                    InterruptedException

      Offer the data and wait for the response
      Throws:
        `org.apache.zookeeper.KeeperException`
        `InterruptedException`

    - #### peekTopN

          public List<OverseerTaskQueue.QueueEvent> peekTopN(int n,
                                                             Predicate<String> excludeSet,
                                                             long waitMillis)
                                                      throws org.apache.zookeeper.KeeperException,
                                                             InterruptedException

      Throws:
        `org.apache.zookeeper.KeeperException`
        `InterruptedException`

    - #### getTailId

          public String getTailId()
                           throws org.apache.zookeeper.KeeperException,
                                  InterruptedException

      Gets last element of the Queue without removing it.
      Throws:
        `org.apache.zookeeper.KeeperException`
        `InterruptedException`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.