protected final class BufferManager.CloseableSortingBufferWithDuplicates<K extends Comparable<K>,V> extends BufferManager.CloseableBuffer implements BufferManager.SortingBuffer<K,V>
name, onHeap| Modifier | Constructor and Description |
|---|---|
protected |
BufferManager.CloseableSortingBufferWithDuplicates(String name,
boolean onHeap,
NavigableMap<BufferManager.UniqueKey<K>,V> buffer) |
| Modifier and Type | Method and Description |
|---|---|
Iterator<V> |
ascending()
Get an iterator over all of the records in ascending order.
|
Iterator<V> |
descending()
Get an iterator over all of the records in descending order.
|
Iterator<V> |
getAll(K key)
Get an iterator over all of the records that have the given sortable value.
|
Iterator<V> |
getAll(K lowerKey,
boolean includeLowerKey,
K upperKey,
boolean includeUpperKey)
Get an iterator over all of the records that have a sortable value with in the specified range.
|
boolean |
isEmpty()
Determine if this buffer is empty.
|
void |
put(K sortable,
V record)
Put the supplied value into the buffer given its sortable value.
|
long |
size()
Get the size of the buffer.
|
String |
toString() |
closeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloseprotected BufferManager.CloseableSortingBufferWithDuplicates(String name, boolean onHeap, NavigableMap<BufferManager.UniqueKey<K>,V> buffer)
public boolean isEmpty()
BufferManager.BufferBufferManager.Buffer.size().isEmpty in interface BufferManager.Bufferpublic long size()
BufferManager.Buffersize in interface BufferManager.Bufferpublic void put(K sortable, V record)
BufferManager.SortingBufferput in interface BufferManager.SortingBuffer<K extends Comparable<K>,V>sortable - the value of the record that is to be used for sortingrecord - the recordpublic Iterator<V> getAll(K key)
BufferManager.SortingBuffergetAll in interface BufferManager.SortingBuffer<K extends Comparable<K>,V>key - the sortable valuepublic Iterator<V> getAll(K lowerKey, boolean includeLowerKey, K upperKey, boolean includeUpperKey)
BufferManager.SortingBuffergetAll in interface BufferManager.SortingBuffer<K extends Comparable<K>,V>lowerKey - the minimum sortable value; may be null if there is no minimumincludeLowerKey - true if the values equal to or greater than lowerKey value is to be included, or false
if only values greater than lowerKey should be includedupperKey - the maximum sortable value; may be null if there is no maximumincludeUpperKey - true if the values equal to or less than upperKey value are to be included, or false if
only values less than upperKey should be includedpublic Iterator<V> ascending()
BufferManager.SortingBufferascending in interface BufferManager.SortingBuffer<K extends Comparable<K>,V>public Iterator<V> descending()
BufferManager.SortingBufferdescending in interface BufferManager.SortingBuffer<K extends Comparable<K>,V>Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.