Package org.geotools.renderer.lite
Class StreamingRenderer.RenderingBlockingQueue
- Object
-
- RenderingBlockingQueue
-
- All Implemented Interfaces:
Iterable<StreamingRenderer.RenderingRequest>
,Collection<StreamingRenderer.RenderingRequest>
,BlockingQueue<StreamingRenderer.RenderingRequest>
,Queue<StreamingRenderer.RenderingRequest>
- Enclosing class:
- StreamingRenderer
public class StreamingRenderer.RenderingBlockingQueue extends Object implements BlockingQueue<StreamingRenderer.RenderingRequest>
A blocking queue subclass with a special behavior for the occasion when the rendering stop has been requested: puts are getting ignored, and take always returns an EndRequest- Author:
- Andrea Aime - GeoSolutions
-
-
Constructor Summary
Constructors Constructor Description RenderingBlockingQueue(int capacity)
-
Method Summary
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Collection
equals, hashCode, toArray
-
-
-
-
Method Detail
-
add
public boolean add(StreamingRenderer.RenderingRequest renderingRequest)
- Specified by:
add
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
- Specified by:
add
in interfaceCollection<StreamingRenderer.RenderingRequest>
- Specified by:
add
in interfaceQueue<StreamingRenderer.RenderingRequest>
-
offer
public boolean offer(StreamingRenderer.RenderingRequest renderingRequest)
- Specified by:
offer
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
- Specified by:
offer
in interfaceQueue<StreamingRenderer.RenderingRequest>
-
remove
public StreamingRenderer.RenderingRequest remove()
- Specified by:
remove
in interfaceQueue<StreamingRenderer.RenderingRequest>
-
poll
public StreamingRenderer.RenderingRequest poll()
- Specified by:
poll
in interfaceQueue<StreamingRenderer.RenderingRequest>
-
element
public StreamingRenderer.RenderingRequest element()
- Specified by:
element
in interfaceQueue<StreamingRenderer.RenderingRequest>
-
peek
public StreamingRenderer.RenderingRequest peek()
- Specified by:
peek
in interfaceQueue<StreamingRenderer.RenderingRequest>
-
put
public void put(StreamingRenderer.RenderingRequest e) throws InterruptedException
- Specified by:
put
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
- Throws:
InterruptedException
-
offer
public boolean offer(StreamingRenderer.RenderingRequest renderingRequest, long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
offer
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
- Throws:
InterruptedException
-
take
public StreamingRenderer.RenderingRequest take() throws InterruptedException
- Specified by:
take
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
- Throws:
InterruptedException
-
poll
public StreamingRenderer.RenderingRequest poll(long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
poll
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
- Throws:
InterruptedException
-
remainingCapacity
public int remainingCapacity()
- Specified by:
remainingCapacity
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
- Specified by:
remove
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
addAll
public boolean addAll(Collection<? extends StreamingRenderer.RenderingRequest> c)
- Specified by:
addAll
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
removeIf
public boolean removeIf(Predicate<? super StreamingRenderer.RenderingRequest> filter)
- Specified by:
removeIf
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
spliterator
public Spliterator<StreamingRenderer.RenderingRequest> spliterator()
- Specified by:
spliterator
in interfaceCollection<StreamingRenderer.RenderingRequest>
- Specified by:
spliterator
in interfaceIterable<StreamingRenderer.RenderingRequest>
-
stream
public Stream<StreamingRenderer.RenderingRequest> stream()
- Specified by:
stream
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
parallelStream
public Stream<StreamingRenderer.RenderingRequest> parallelStream()
- Specified by:
parallelStream
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
size
public int size()
- Specified by:
size
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
- Specified by:
contains
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
iterator
public Iterator<StreamingRenderer.RenderingRequest> iterator()
- Specified by:
iterator
in interfaceCollection<StreamingRenderer.RenderingRequest>
- Specified by:
iterator
in interfaceIterable<StreamingRenderer.RenderingRequest>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfaceCollection<StreamingRenderer.RenderingRequest>
-
drainTo
public int drainTo(Collection<? super StreamingRenderer.RenderingRequest> list)
- Specified by:
drainTo
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
-
drainTo
public int drainTo(Collection<? super StreamingRenderer.RenderingRequest> c, int maxElements)
- Specified by:
drainTo
in interfaceBlockingQueue<StreamingRenderer.RenderingRequest>
-
-