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>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCreated()
EntryHeader
getHeader()
byte[]
getInternalMetadata()
byte[]
getKey()
long
getLastUsed()
byte[]
getMetadata()
byte[]
getValue()
EntryRecord
loadMetadata(FileProvider.Handle handle, int offset)
EntryRecord
loadMetadataAndValue(FileProvider.Handle handle, int offset, boolean saveValue)
static EntryHeader
read10_1EntryHeader(FileProvider.Handle handle, long offset)
static EntryHeader
readEntryHeader(FileProvider.Handle handle, long offset)
static byte[]
readInternalMetadata(FileProvider.Handle handle, EntryHeader header, long offset)
static byte[]
readKey(FileProvider.Handle handle, EntryHeader header, long offset)
static EntryMetadata
readMetadata(FileProvider.Handle handle, EntryHeader header, long offset)
static byte[]
readValue(FileProvider.Handle handle, EntryHeader header, long offset)
String
toString()
static void
writeEntry(FileChannel fileChannel, ByteBuffer reusedBuffer, byte[] serializedKey, EntryMetadata metadata, byte[] serializedValue, byte[] serializedInternalMetadata, long seqId, long expiration)
-
-
-
Method Detail
-
getHeader
public EntryHeader getHeader()
-
getKey
public byte[] getKey()
-
getMetadata
public byte[] getMetadata()
-
getInternalMetadata
public byte[] getInternalMetadata()
-
getValue
public byte[] getValue()
-
getCreated
public long getCreated()
-
getLastUsed
public long getLastUsed()
-
toString
public String toString()
-
loadMetadataAndValue
public EntryRecord loadMetadataAndValue(FileProvider.Handle handle, int offset, boolean saveValue) throws IOException
- Throws:
IOException
-
loadMetadata
public EntryRecord loadMetadata(FileProvider.Handle handle, int offset) throws IOException
- Throws:
IOException
-
readEntryHeader
public static EntryHeader readEntryHeader(FileProvider.Handle handle, long offset) throws IOException
- Throws:
IOException
-
read10_1EntryHeader
public static EntryHeader read10_1EntryHeader(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 EntryMetadata readMetadata(FileProvider.Handle handle, EntryHeader header, long offset) throws IOException
- Throws:
IOException
-
readInternalMetadata
public static byte[] readInternalMetadata(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, ByteBuffer reusedBuffer, byte[] serializedKey, EntryMetadata metadata, byte[] serializedValue, byte[] serializedInternalMetadata, long seqId, long expiration) throws IOException
- Throws:
IOException
-
-