public class EntryRecord
extends java.lang.Object
| Constructor and Description |
|---|
EntryRecord(EntryHeader header,
byte[] key,
byte[] metadata,
byte[] value) |
| Modifier and Type | Method and Description |
|---|---|
EntryHeader |
getHeader() |
byte[] |
getKey() |
byte[] |
getMetadata() |
byte[] |
getValue() |
EntryRecord |
loadMetadataAndValue(FileProvider.Handle handle,
int offset) |
static EntryHeader |
readEntryHeader(FileProvider.Handle handle,
long offset) |
static byte[] |
readKey(FileProvider.Handle handle,
EntryHeader header,
long offset) |
static byte[] |
readMetadata(FileProvider.Handle handle,
EntryHeader header,
long offset) |
static byte[] |
readValue(FileProvider.Handle handle,
EntryHeader header,
long offset) |
static void |
writeEntry(java.nio.channels.FileChannel fileChannel,
byte[] serializedKey,
byte[] serializedMetadata,
byte[] serializedValue,
long seqId,
long expiration) |
static void |
writeEntry(java.nio.channels.FileChannel fileChannel,
ByteBuffer serializedKey,
ByteBuffer serializedMetadata,
ByteBuffer serializedValue,
long seqId,
long expiration) |
public EntryRecord(EntryHeader header, byte[] key, byte[] metadata, byte[] value)
public EntryHeader getHeader()
public byte[] getKey()
public byte[] getMetadata()
public byte[] getValue()
public EntryRecord loadMetadataAndValue(FileProvider.Handle handle, int offset) throws java.io.IOException
java.io.IOExceptionpublic static EntryHeader readEntryHeader(FileProvider.Handle handle, long offset) throws java.io.IOException
java.io.IOExceptionpublic static byte[] readKey(FileProvider.Handle handle, EntryHeader header, long offset) throws java.io.IOException
java.io.IOExceptionpublic static byte[] readMetadata(FileProvider.Handle handle, EntryHeader header, long offset) throws java.io.IOException
java.io.IOExceptionpublic static byte[] readValue(FileProvider.Handle handle, EntryHeader header, long offset) throws java.io.IOException
java.io.IOExceptionpublic static void writeEntry(java.nio.channels.FileChannel fileChannel,
byte[] serializedKey,
byte[] serializedMetadata,
byte[] serializedValue,
long seqId,
long expiration)
throws java.io.IOException
java.io.IOExceptionpublic static void writeEntry(java.nio.channels.FileChannel fileChannel,
ByteBuffer serializedKey,
ByteBuffer serializedMetadata,
ByteBuffer serializedValue,
long seqId,
long expiration)
throws java.io.IOException
java.io.IOException