Package org.apache.solr.cloud
Class OverseerTaskQueue
- java.lang.Object
- 
- org.apache.solr.cloud.ZkDistributedQueue
- 
- org.apache.solr.cloud.OverseerTaskQueue
 
 
- 
- All Implemented Interfaces:
- DistributedQueue
 
 public class OverseerTaskQueue extends ZkDistributedQueue AZkDistributedQueueaugmented 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 SummaryNested Classes Modifier and Type Class Description static classOverseerTaskQueue.QueueEvent
 - 
Constructor SummaryConstructors Constructor Description OverseerTaskQueue(SolrZkClient zookeeper, String dir)OverseerTaskQueue(SolrZkClient zookeeper, String dir, Stats stats)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallowOverseerPendingTasksToComplete()booleancontainsTaskWithRequestId(String requestIdKey, String requestId)Returns true if the queue contains a task with the specified async id.StringgetTailId()Gets last element of the Queue without removing it.OverseerTaskQueue.QueueEventoffer(byte[] data, long timeout)Offer the data and wait for the responseList<OverseerTaskQueue.QueueEvent>peekTopN(int n, Predicate<String> excludeSet, long waitMillis)voidremove(OverseerTaskQueue.QueueEvent event)Remove the event and save the response into the other path.- 
Methods inherited from class org.apache.solr.cloud.ZkDistributedQueuegetStats, getZkStats, offer, peek, peek, peek, peekElements, poll, remove, remove, take
 
- 
 
- 
- 
- 
Constructor Detail- 
OverseerTaskQueuepublic OverseerTaskQueue(SolrZkClient zookeeper, String dir) 
 - 
OverseerTaskQueuepublic OverseerTaskQueue(SolrZkClient zookeeper, String dir, Stats stats) 
 
- 
 - 
Method Detail- 
allowOverseerPendingTasksToCompletepublic void allowOverseerPendingTasksToComplete() 
 - 
containsTaskWithRequestIdpublic 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
 
 - 
removepublic 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
 
 - 
offerpublic 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
 
 - 
peekTopNpublic List<OverseerTaskQueue.QueueEvent> peekTopN(int n, Predicate<String> excludeSet, long waitMillis) throws org.apache.zookeeper.KeeperException, InterruptedException - Throws:
- org.apache.zookeeper.KeeperException
- InterruptedException
 
 - 
getTailIdpublic String getTailId() throws org.apache.zookeeper.KeeperException, InterruptedException Gets last element of the Queue without removing it.- Throws:
- org.apache.zookeeper.KeeperException
- InterruptedException
 
 
- 
 
-