com.alexkasko.unsafe.offheapstruct
private static class OffHeapStructSorterInt.MergeIter extends Object implements OffHeapDisposableIterator<byte[]>
| Modifier and Type | Field and Description |
|---|---|
private List<OffHeapStructSorterInt.Worker> |
bounds |
private byte[] |
buf |
private OffHeapStructCollection |
col |
private long[] |
indices |
private int |
keyOffset |
| Modifier | Constructor and Description |
|---|---|
private |
OffHeapStructSorterInt.MergeIter(OffHeapStructCollection col,
int keyOffset,
List<OffHeapStructSorterInt.Worker> bounds)
Private 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 |
private final OffHeapStructCollection col
private final int keyOffset
private final List<OffHeapStructSorterInt.Worker> bounds
private final long[] indices
private final byte[] buf
private OffHeapStructSorterInt.MergeIter(OffHeapStructCollection col, int keyOffset, List<OffHeapStructSorterInt.Worker> bounds)
col - partly sorted collectionkeyOffset - key offset used to partially sort collectionbounds - collection sorted parts boundspublic void free()
free in interface OffHeapDisposablepublic long size()
-1 otherwisesize in interface OffHeapDisposableIterator<byte[]>Copyright © 2014. All Rights Reserved.