Package org.infinispan.persistence.sifs
Class EntryRecord
- java.lang.Object
-
- org.infinispan.persistence.sifs.EntryRecord
-
public class EntryRecord extends java.lang.ObjectHelper 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 EntryHeadergetHeader()byte[]getKey()byte[]getMetadata()byte[]getValue()EntryRecordloadMetadataAndValue(FileProvider.Handle handle, int offset)static EntryHeaderreadEntryHeader(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 voidwriteEntry(java.nio.channels.FileChannel fileChannel, byte[] serializedKey, byte[] serializedMetadata, byte[] serializedValue, long seqId, long expiration)static voidwriteEntry(java.nio.channels.FileChannel fileChannel, ByteBuffer serializedKey, ByteBuffer serializedMetadata, 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 java.io.IOException
- Throws:
java.io.IOException
-
readEntryHeader
public static EntryHeader readEntryHeader(FileProvider.Handle handle, long offset) throws java.io.IOException
- Throws:
java.io.IOException
-
readKey
public static byte[] readKey(FileProvider.Handle handle, EntryHeader header, long offset) throws java.io.IOException
- Throws:
java.io.IOException
-
readMetadata
public static byte[] readMetadata(FileProvider.Handle handle, EntryHeader header, long offset) throws java.io.IOException
- Throws:
java.io.IOException
-
readValue
public static byte[] readValue(FileProvider.Handle handle, EntryHeader header, long offset) throws java.io.IOException
- Throws:
java.io.IOException
-
writeEntry
public static void writeEntry(java.nio.channels.FileChannel fileChannel, byte[] serializedKey, byte[] serializedMetadata, byte[] serializedValue, long seqId, long expiration) throws java.io.IOException- Throws:
java.io.IOException
-
writeEntry
public static void writeEntry(java.nio.channels.FileChannel fileChannel, ByteBuffer serializedKey, ByteBuffer serializedMetadata, ByteBuffer serializedValue, long seqId, long expiration) throws java.io.IOException- Throws:
java.io.IOException
-
-