|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.solr.cloud.DistributedQueue
public class DistributedQueue
A distributed queue from zk recipes.
| Constructor Summary | |
|---|---|
DistributedQueue(SolrZkClient zookeeper,
String dir,
List<org.apache.zookeeper.data.ACL> acl)
|
|
| Method Summary | |
|---|---|
byte[] |
element()
Return the head of the queue without modifying the queue. |
boolean |
offer(byte[] data)
Inserts data into queue. |
byte[] |
peek()
Returns the data at the first element of the queue, or null if the queue is empty. |
byte[] |
peek(boolean block)
Returns the data at the first element of the queue, or null if the queue is empty. |
byte[] |
poll()
Attempts to remove the head of the queue and return it. |
byte[] |
remove()
Attempts to remove the head of the queue and return it. |
byte[] |
take()
Removes the head of the queue and returns it, blocks until it succeeds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DistributedQueue(SolrZkClient zookeeper,
String dir,
List<org.apache.zookeeper.data.ACL> acl)
| Method Detail |
|---|
public byte[] element()
throws NoSuchElementException,
org.apache.zookeeper.KeeperException,
InterruptedException
NoSuchElementException
org.apache.zookeeper.KeeperException
InterruptedException
public byte[] remove()
throws NoSuchElementException,
org.apache.zookeeper.KeeperException,
InterruptedException
NoSuchElementException
org.apache.zookeeper.KeeperException
InterruptedException
public byte[] take()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public boolean offer(byte[] data)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public byte[] peek()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public byte[] peek(boolean block)
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public byte[] poll()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||