Package org.infinispan.persistence.sifs
Class EntryRecord
- java.lang.Object
-
- org.infinispan.persistence.sifs.EntryRecord
-
public class EntryRecord extends java.lang.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[]
getKey()
long
getLastUsed()
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 EntryMetadata
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, EntryMetadata metadata, byte[] serializedValue, long seqId, long expiration)
static void
writeEntry(java.nio.channels.FileChannel fileChannel, ByteBuffer serializedKey, ByteBuffer serializedMetadata, ByteBuffer serializedValue, long seqId, long expiration, long created, long lastUsed)
-
-
-
Method Detail
-
getHeader
public EntryHeader getHeader()
-
getKey
public byte[] getKey()
-
getMetadata
public byte[] getMetadata()
-
getValue
public byte[] getValue()
-
getCreated
public long getCreated()
-
getLastUsed
public long getLastUsed()
-
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 EntryMetadata 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, EntryMetadata metadata, 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, long created, long lastUsed) throws java.io.IOException
- Throws:
java.io.IOException
-
-