Package org.infinispan.persistence.sifs
Class EntryRecord
java.lang.Object
org.infinispan.persistence.sifs.EntryRecord
Helper for reading/writing entries into file.
- Author:
- Radim Vansa <rvansa@redhat.com>
-
Method Summary
Modifier and TypeMethodDescriptionlong
byte[]
byte[]
getKey()
long
byte[]
byte[]
getValue()
loadMetadata
(FileProvider.Handle handle, int offset) 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) toString()
static void
writeEntry
(FileChannel fileChannel, ByteBuffer reusedBuffer, byte[] serializedKey, EntryMetadata metadata, byte[] serializedValue, byte[] serializedInternalMetadata, long seqId, long expiration)
-
Method Details
-
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
-
loadMetadataAndValue
public EntryRecord loadMetadataAndValue(FileProvider.Handle handle, int offset, boolean saveValue) throws IOException - Throws:
IOException
-
loadMetadata
- 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
-