|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.unister.semweb.drums.storable.AbstractKVStorable
public abstract class AbstractKVStorable
Abstract implementation of interface AbstractKVStorable. Extend this class to build your own storable
objects.
| Constructor Summary | |
|---|---|
AbstractKVStorable()
|
|
| Method Summary | ||
|---|---|---|
abstract AbstractKVStorable |
clone()
|
|
boolean |
equals(java.lang.Object obj)
|
|
abstract
|
fromByteBuffer(java.nio.ByteBuffer bb)
Generates a new Object from the given ByteBuffer. |
|
byte[] |
getKey()
|
|
int |
getSize()
Returns the number of bytes needed to store key and value. |
|
byte[] |
getValue()
|
|
abstract void |
initFromByteBuffer(java.nio.ByteBuffer bb)
Initializes the object from the given ByteBuffer |
|
boolean |
isMarkedAsDeleted()
This method returns false by default. |
|
abstract
|
merge(Data element)
Merges the given AbstractKVStorable with this one by your implementation. |
|
static
|
merge(Data[] toAdd)
This method merges all AbstractKVStorables in the given array with same keys. |
|
void |
setKey(byte[] key)
Sets the key of this object. |
|
void |
setValue(byte[] value)
Sets the value of this object. |
|
abstract java.nio.ByteBuffer |
toByteBuffer()
Converts the object to a ByteBuffer |
|
abstract
|
update(Data element)
Updates the given AbstractKVStorable with values from this one. |
|
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractKVStorable()
| Method Detail |
|---|
public void setValue(byte[] value)
value - public byte[] getValue()
public void setKey(byte[] key)
key - public byte[] getKey()
public abstract AbstractKVStorable clone()
clone in class java.lang.Objectpublic int getSize()
public abstract java.nio.ByteBuffer toByteBuffer()
ByteBuffer
ByteBufferpublic abstract void initFromByteBuffer(java.nio.ByteBuffer bb)
ByteBuffer
bb - public abstract <Data extends AbstractKVStorable> Data fromByteBuffer(java.nio.ByteBuffer bb)
ByteBuffer.
bb -
public abstract <Data extends AbstractKVStorable> Data merge(Data element)
AbstractKVStorable with this one by your implementation.
element -
AbstractKVStorable.public abstract <Data extends AbstractKVStorable> void update(Data element)
AbstractKVStorable with values from this one.
element - public boolean isMarkedAsDeleted()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic static <Data extends AbstractKVStorable> Data[] merge(Data[] toAdd)
AbstractKVStorables in the given array with same keys. The array must been sorted.
toAdd - this array might contain duplicate entries concerning the key, which must be merged.
AbstractKVStorables. The array is sorted.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||