public class BoundMetricFifo extends AbstractQueue<SingleMetric> implements Queue<SingleMetric>
| Constructor and Description |
|---|
BoundMetricFifo(int initialSize,
int maxSize)
Create a new Fifo with an initial internal capacity of initialSize and a
maximum capacity of maxSize.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cleanout(Collection<SingleMetric> metrics)
Remove the collection of passed metrics from the fifo.
|
boolean |
cleanout(SingleMetric metric)
Remove the single passed metric from the fifo
|
List<SingleMetric> |
getList()
Retrieve a copy of the current items in the fifo.
|
Iterator<SingleMetric> |
iterator() |
boolean |
offer(SingleMetric singleMetric)
Add an object to the Fifo.
|
SingleMetric |
peek() |
SingleMetric |
poll() |
int |
size() |
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAll, clear, contains, containsAll, equals, hashCode, isEmpty, parallelStream, remove, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArraypublic BoundMetricFifo(int initialSize,
int maxSize)
initialSize - Initial internal capacity.maxSize - Maximum capacity of the Fifo.public Iterator<SingleMetric> iterator()
iterator in interface Iterable<SingleMetric>iterator in interface Collection<SingleMetric>iterator in class AbstractCollection<SingleMetric>public int size()
size in interface Collection<SingleMetric>size in class AbstractCollection<SingleMetric>public boolean offer(SingleMetric singleMetric)
offer in interface Queue<SingleMetric>singleMetric - Metric to addpublic SingleMetric poll()
poll in interface Queue<SingleMetric>public SingleMetric peek()
peek in interface Queue<SingleMetric>public boolean cleanout(SingleMetric metric)
metric - Metric to removepublic boolean cleanout(Collection<SingleMetric> metrics)
metrics - Metrics to removepublic List<SingleMetric> getList()
Copyright © 2014–2017 Red Hat, Inc.. All rights reserved.