public class MappedStore extends Object implements BytesStore, Closeable
| Constructor and Description |
|---|
MappedStore(File file,
FileChannel.MapMode mode,
long size) |
MappedStore(File file,
FileChannel.MapMode mode,
long size,
BytesMarshallerFactory bytesMarshallerFactory)
Deprecated.
|
MappedStore(File file,
FileChannel.MapMode mode,
long size,
ObjectSerializer objectSerializer) |
| Modifier and Type | Method and Description |
|---|---|
long |
address() |
DirectBytes |
bytes()
Create a bytes whose content is the whole bytes store.
|
DirectBytes |
bytes(long offset,
long length)
|
void |
close() |
File |
file() |
void |
free() |
ObjectSerializer |
objectSerializer() |
long |
size() |
public MappedStore(File file, FileChannel.MapMode mode, long size) throws IOException
IOException@Deprecated public MappedStore(File file, FileChannel.MapMode mode, long size, BytesMarshallerFactory bytesMarshallerFactory) throws IOException
IOExceptionpublic MappedStore(File file, FileChannel.MapMode mode, long size, ObjectSerializer objectSerializer) throws IOException
IOExceptionpublic ObjectSerializer objectSerializer()
objectSerializer in interface BytesStorepublic long address()
address in interface BytesStorepublic long size()
size in interface BytesStorepublic void free()
free in interface BytesStorepublic void close()
close in interface Closeableclose in interface AutoCloseable@NotNull public DirectBytes bytes()
BytesStorebytes(0, size()) call.bytes in interface BytesStoreBytesStore.bytes(long, long)@NotNull public DirectBytes 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 File file()
file in interface BytesStoreCopyright © 2015. All rights reserved.