com.alexkasko.unsafe.offheapstruct
class OffHeapStructIterator extends Object implements OffHeapDisposableIterator<byte[]>
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
buffer |
private OffHeapStructCollection |
data |
private long |
index |
private long |
size |
| Constructor and Description |
|---|
OffHeapStructIterator(OffHeapStructCollection data)
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()
Remove operation is not supported
|
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 long size
private final byte[] buffer
private long index
OffHeapStructIterator(OffHeapStructCollection data)
data - struct collectionpublic void remove()
remove in interface Iterator<byte[]>UnsupportedOperationExceptionpublic void free()
free in interface OffHeapDisposablepublic long size()
-1 otherwisesize in interface OffHeapDisposableIterator<byte[]>Copyright © 2014. All Rights Reserved.