Package org.infinispan.persistence.sifs
Class EntryRecord
- java.lang.Object
-
- org.infinispan.persistence.sifs.EntryRecord
-
public class EntryRecord extends Object
Helper for reading/writing entries into file.- Author:
- Radim Vansa <rvansa@redhat.com>
-
-
Constructor Summary
Constructors Constructor Description EntryRecord(EntryHeader header, byte[] key, byte[] metadata, byte[] value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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(FileChannel fileChannel, byte[] serializedKey, byte[] serializedMetadata, byte[] serializedValue, long seqId, long expiration)
static void
writeEntry(FileChannel fileChannel, org.infinispan.commons.io.ByteBuffer serializedKey, org.infinispan.commons.io.ByteBuffer serializedMetadata, org.infinispan.commons.io.ByteBuffer serializedValue, long seqId, long expiration)
-
-
-
Constructor Detail
-
EntryRecord
public EntryRecord(EntryHeader header, byte[] key, byte[] metadata, byte[] value)
-
-
Method Detail
-
getHeader
public EntryHeader getHeader()
-
getKey
public byte[] getKey()
-
getMetadata
public byte[] getMetadata()
-
getValue
public byte[] getValue()
-
loadMetadataAndValue
public EntryRecord loadMetadataAndValue(FileProvider.Handle handle, int offset) throws IOException
- Throws:
IOException
-
readEntryHeader
public static EntryHeader readEntryHeader(FileProvider.Handle handle, long offset) throws IOException
- Throws:
IOException
-
readKey
public static byte[] readKey(FileProvider.Handle handle, EntryHeader header, long offset) throws IOException
- Throws:
IOException
-
readMetadata
public static byte[] readMetadata(FileProvider.Handle handle, EntryHeader header, long offset) throws IOException
- Throws:
IOException
-
readValue
public static byte[] readValue(FileProvider.Handle handle, EntryHeader header, long offset) throws IOException
- Throws:
IOException
-
writeEntry
public static void writeEntry(FileChannel fileChannel, byte[] serializedKey, byte[] serializedMetadata, byte[] serializedValue, long seqId, long expiration) throws IOException
- Throws:
IOException
-
writeEntry
public static void writeEntry(FileChannel fileChannel, org.infinispan.commons.io.ByteBuffer serializedKey, org.infinispan.commons.io.ByteBuffer serializedMetadata, org.infinispan.commons.io.ByteBuffer serializedValue, long seqId, long expiration) throws IOException
- Throws:
IOException
-
-