public class MappedMemory extends Object implements ReferenceCounted, BytesStore
| Constructor and Description |
|---|
MappedMemory(MappedByteBuffer buffer,
long index) |
| Modifier and Type | Method and Description |
|---|---|
long |
address() |
MappedByteBuffer |
buffer() |
Bytes |
bytes()
Create a bytes whose content is the whole bytes store.
|
Bytes |
bytes(long offset,
long length)
|
void |
close() |
File |
file() |
void |
force() |
void |
free() |
long |
index() |
ObjectSerializer |
objectSerializer() |
int |
refCount() |
boolean |
release() |
static void |
release(MappedMemory mapmem) |
void |
reserve() |
long |
size() |
public MappedMemory(MappedByteBuffer buffer, long index)
public static void release(MappedMemory mapmem)
public long index()
public void reserve()
reserve in interface ReferenceCountedpublic boolean release()
release in interface ReferenceCountedpublic int refCount()
refCount in interface ReferenceCountedpublic MappedByteBuffer buffer()
public long address()
address in interface BytesStorepublic long size()
size in interface BytesStorepublic void free()
free in interface BytesStorepublic ObjectSerializer objectSerializer()
objectSerializer in interface BytesStorepublic File file()
file in interface BytesStorepublic Bytes bytes()
BytesStorebytes(0, size()) call.bytes in interface BytesStoreBytesStore.bytes(long, long)public Bytes bytes(long offset, long length)
BytesStoreBytes object with start address of
address+ offset and capacity of length.
If this BytesStore is Bytes itself rather than natural
BytesStore object, this method will offset the new bytes from the
bytes' start, not from bytes' position like
BytesCommon.slice(long, long).
offset should be non-negative, length should be positive,
offset + length should be less or equal to size.
bytes in interface BytesStoreoffset - offset of the new bytes from the bytes store addresslength - capacity and limit of the new bytesBytesBytesStore.bytes()public void force()
public void close()
Copyright © 2019. All rights reserved.