com.alexkasko.unsafe.offheapstruct
private static class OffHeapStructSorterByReference.ReferenceIterator extends Object implements OffHeapDisposableIterator<byte[]>
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
buf |
private OffHeapStructCollection |
data |
private long |
ii |
private OffHeapLongArray |
index |
private long |
size |
| Modifier | Constructor and Description |
|---|---|
private |
OffHeapStructSorterByReference.ReferenceIterator(OffHeapStructCollection data,
OffHeapLongArray index)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
free()
Frees allocated memory, may be called multiple times from any thread
|
boolean |
hasNext() |
byte[] |
next() |
void |
remove() |
long |
size()
Optional method, should return size of the underlying collections,
if such size is known on iterator creation or
-1 otherwise |
String |
toString() |
private final OffHeapStructCollection data
private final OffHeapLongArray index
private final byte[] buf
private final long size
private long ii
private OffHeapStructSorterByReference.ReferenceIterator(OffHeapStructCollection data, OffHeapLongArray index)
data - data to iterate overindex - sorted indexpublic long size()
-1 otherwisesize in interface OffHeapDisposableIterator<byte[]>public void free()
free in interface OffHeapDisposableCopyright © 2014. All Rights Reserved.