org.apache.solr.client.solrj.cloud

## Interface DistributedQueue

    public interface DistributedQueue

Distributed queue component. Methods largely follow those in `Queue`.

### Method Summary

All Methods Instance Methods Abstract Methods
`Map<String,Object>` `getStats()` Retrieve statistics about the queue size, operations and their timings.
`void` `offer(byte[] data)`
`byte[]` `peek()`
`byte[]` `peek(boolean block)`
`byte[]` `peek(long wait)`
`Collection<Pair<String,byte[]>>` `peekElements(int max, long waitMillis, Predicate<String> acceptFilter)` Peek multiple elements from the queue in a single call.
`byte[]` `poll()`
`byte[]` `remove()`
`byte[]` `take()`

### Method Detail

#### peek

    byte[] peek()
         throws Exception

Throws:
  `Exception`

#### peek

    byte[] peek(boolean block)
         throws Exception

Throws:
  `Exception`

#### peek

    byte[] peek(long wait)
         throws Exception

Throws:
  `Exception`

#### poll

    byte[] poll()
         throws Exception

Throws:
  `Exception`

#### remove

    byte[] remove()
           throws Exception

Throws:
  `Exception`

#### take

    byte[] take()
         throws Exception

Throws:
  `Exception`

#### offer

    void offer(byte[] data)
        throws Exception

Throws:
  `Exception`

#### getStats

    Map<String,Object> getStats()

Retrieve statistics about the queue size, operations and their timings.

#### peekElements

    Collection<Pair<String,byte[]>> peekElements(int max,
                                                 long waitMillis,
                                                 Predicate<String> acceptFilter)
                                          throws Exception

Peek multiple elements from the queue in a single call.

Parameters:
  `max` - maximum elements to retrieve
  `waitMillis` - if less than maximum element is in the queue then wait at most this time for at least one new element.
  `acceptFilter` - peek only elements that pass this filter
Returns:
  peeked elements
Throws:
  `Exception` - on errors