|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rawstore.AbstractRawStore
public abstract class AbstractRawStore
Abstract base class for IRawStore implementations. This class uses a
delegation pattern for the IStoreSerializer interface and does not
implement either the methods defined directly by the IRawStore
interface nor the methods of the IAddressManager interface. As such
it may be used as an abstract base class by any IRawStore
implementation.
| Field Summary | |
|---|---|
protected IStoreSerializer |
serializer
The object that handles serialization. |
| Fields inherited from interface com.bigdata.rawstore.IAddressManager |
|---|
NULL |
| Constructor Summary | |
|---|---|
AbstractRawStore()
The designated constructor. |
|
| Method Summary | |
|---|---|
Object |
deserialize(byte[] b)
De-serialize an object using the Java serialization mechanisms. |
Object |
deserialize(byte[] b,
int off,
int len)
De-serialize an object using the Java serialization mechanisms. |
Object |
deserialize(ByteBuffer buf)
De-serialize an object using the Java serialization mechanisms. |
abstract IAddressManager |
getAddressManager()
Return the delegate object that provides the IAddressManager
implementation for this IRawStore. |
byte[] |
serialize(Object obj)
Serialize an object using the Java serialization mechanisms. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.bigdata.rawstore.IRawStore |
|---|
close, deleteResources, destroy, force, getCounters, getFile, getResourceMetadata, getUUID, isFullyBuffered, isOpen, isReadOnly, isStable, read, size, write |
| Methods inherited from interface com.bigdata.rawstore.IAddressManager |
|---|
getByteCount, getOffset, packAddr, toAddr, toString, unpackAddr |
| Field Detail |
|---|
protected final IStoreSerializer serializer
| Constructor Detail |
|---|
public AbstractRawStore()
| Method Detail |
|---|
public abstract IAddressManager getAddressManager()
IAddressManager
implementation for this IRawStore.
Note: LRUNexus depends on the delegation model to retain
references to the IAddressManager without causing the
IRawStore to be retained. It uses the IAddressManager to
decode the address in order to track the bytesOnDisk for the buffered
records.
public final Object deserialize(byte[] b,
int off,
int len)
IStoreSerializer
deserialize in interface IStoreSerializerb - A byte[] containing a serialized object.off - The offset of the first byte to de-serialize.len - The #of bytes in the object record.
public final Object deserialize(byte[] b)
IStoreSerializer
deserialize in interface IStoreSerializerb - A byte[] containing a serialized object.
public final Object deserialize(ByteBuffer buf)
IStoreSerializer
deserialize in interface IStoreSerializerbuf - A buffer containing a serialized object. The bytes from
Buffer.position() to Buffer.limit()
will be de-serialized and the position will be advanced to the
limit.
public final byte[] serialize(Object obj)
IStoreSerializer
serialize in interface IStoreSerializerobj - A Serializable object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||