public class ElementSizeQueue extends Object implements SortedEvictionQueue
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ElementSizeQueue.MaxElementComparator
Comparator class for Max Elements.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ElementSizeQueue() |
| Modifier and Type | Method and Description |
|---|---|
void |
addNodeEntry(NodeEntry entry)
Add a NodeEntry to the queue.
|
void |
clear()
Clear the queue.
|
boolean |
containsNodeEntry(NodeEntry entry)
Check if queue contains the given NodeEntry.
|
protected List<NodeEntry> |
getEvictionList() |
NodeEntry |
getFirstNodeEntry()
Get the first entry in the queue.
|
NodeEntry |
getNodeEntry(Fqn fqn)
Retrieve a node entry by Fqn.
|
NodeEntry |
getNodeEntry(String fqn) |
int |
getNumberOfElements()
Get the number of elements in the queue.
|
int |
getNumberOfNodes()
Get the number of nodes in the queue.
|
protected Set<NodeEntry> |
getRemovalQueue() |
Iterator<NodeEntry> |
iterator() |
void |
modifyElementCount(int difference) |
protected void |
prune() |
void |
removeNodeEntry(NodeEntry entry)
Remove a NodeEntry from queue.
|
void |
resortEvictionQueue()
Provide contract to resort a sorted queue.
|
public void resortEvictionQueue()
SortedEvictionQueueresortEvictionQueue in interface SortedEvictionQueuepublic NodeEntry getFirstNodeEntry()
EvictionQueuegetFirstNodeEntry in interface EvictionQueuepublic NodeEntry getNodeEntry(Fqn fqn)
EvictionQueuegetNodeEntry in interface EvictionQueuefqn - Fqn of the node entry to retrieve.public NodeEntry getNodeEntry(String fqn)
getNodeEntry in interface EvictionQueuepublic boolean containsNodeEntry(NodeEntry entry)
EvictionQueuecontainsNodeEntry in interface EvictionQueueentry - NodeEntry to check for existence in queue.public void removeNodeEntry(NodeEntry entry)
EvictionQueueremoveNodeEntry in interface EvictionQueueentry - The NodeEntry to remove from queue.public void addNodeEntry(NodeEntry entry)
EvictionQueueaddNodeEntry in interface EvictionQueueentry - The NodeEntry to add to queue.public int getNumberOfNodes()
EvictionQueuegetNumberOfNodes in interface EvictionQueuepublic int getNumberOfElements()
EvictionQueuegetNumberOfElements in interface EvictionQueuepublic void modifyElementCount(int difference)
modifyElementCount in interface EvictionQueuepublic void clear()
EvictionQueueclear in interface EvictionQueueprotected final void prune()
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.