public abstract class AbstractUpdateQueue<T> extends java.util.TreeMap<java.lang.Long,T> implements UpdateQueue<T>
UpdateQueue using TreeMap
for storing elements WARNING: this queue has limited capacity due to its in-memory nature| Constructor and Description |
|---|
AbstractUpdateQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(T item)
Adds item to the queue
|
void |
addItems(java.util.List<T> items)
Adds all elements from the list to the queue
|
java.util.List<T> |
getItems()
Returns all elements in the queue.
|
java.util.List<T> |
getItems(java.util.Date newerThan)
Returns all elements in the queue newer than a specific day
|
T |
getLastItem()
Returns last item from the queue
|
int |
getMaxCapacity() |
protected java.lang.Long |
getTimeKey(T item) |
void |
removeItems()
Removes all elements from the queue
|
void |
removeItems(<any> predicate)
Removes all elements from the queue older than a specific date
|
void |
removeItems(java.util.Date olderThan)
Removes all elements from the queue older than a specific date
|
void |
setMaxCapacity(int maxCapacity) |
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, valuespublic java.util.List<T> getItems()
UpdateQueuegetItems in interface UpdateQueue<T>public java.util.List<T> getItems(java.util.Date newerThan)
UpdateQueuegetItems in interface UpdateQueue<T>newerThan - threshold datepublic void addItem(T item)
UpdateQueueaddItem in interface UpdateQueue<T>item - elements to be storedpublic void addItems(java.util.List<T> items)
UpdateQueueaddItems in interface UpdateQueue<T>items - elements to be storedpublic void removeItems(java.util.Date olderThan)
UpdateQueueremoveItems in interface UpdateQueue<T>olderThan - threshold datepublic void removeItems()
UpdateQueueremoveItems in interface UpdateQueue<T>public void removeItems(<any> predicate)
UpdateQueueremoveItems in interface UpdateQueue<T>predicate - threshold datepublic T getLastItem()
UpdateQueuegetLastItem in interface UpdateQueue<T>public int getMaxCapacity()
public void setMaxCapacity(int maxCapacity)
protected java.lang.Long getTimeKey(T item)
Copyright © 2018 SAP SE. All Rights Reserved.