Interface UpdateQueue<T>
- All Known Implementing Classes:
AbstractUpdateQueue,OrderStatusUpdateQueue,ProductExpressUpdateQueue
public interface UpdateQueue<T>
Queue for storing update elements
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdds item to the queuevoidAdds all elements from the list to the queuegetItems()Returns all elements in the queue.Returns all elements in the queue newer than a specific dayReturns last item from the queuevoidRemoves all elements from the queuevoidremoveItems(com.google.common.base.Predicate<T> predicate) Removes all matched elementsvoidremoveItems(Date olderThan) Removes all elements from the queue older than a specific date
-
Method Details
-
getItems
Returns all elements in the queue.- Returns:
- list of stored elements
-
getItems
Returns all elements in the queue newer than a specific day- Parameters:
newerThan- threshold date- Returns:
- list of stored elements
-
addItems
Adds all elements from the list to the queue- Parameters:
items- elements to be stored
-
addItem
Adds item to the queue- Parameters:
items- elements to be stored
-
removeItems
Removes all elements from the queue older than a specific date- Parameters:
olderThan- threshold date
-
removeItems
void removeItems()Removes all elements from the queue -
getLastItem
T getLastItem()Returns last item from the queue- Returns:
- last element
-
removeItems
Removes all matched elements- Parameters:
predicate-
-