|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.rawstore.AbstractRawStore
com.bigdata.rawstore.AbstractRawWormStore
public abstract class AbstractRawWormStore
An abstract base class for IRawStore implementations that use an
append only (Write Once, Read Many) strategy. The IAddressManager
interface is delegated to an WormAddressManager allowing flexible
configuration of the use of bits to represent the byte offset of a record in
the store and the bits used to represent the size of a record in the store.
WormAddressManager| Field Summary | |
|---|---|
protected WormAddressManager |
am
The object that knows how to encode, decode, and (de-)serialize addresses. |
| Fields inherited from class com.bigdata.rawstore.AbstractRawStore |
|---|
serializer |
| Fields inherited from interface com.bigdata.rawstore.IAddressManager |
|---|
NULL |
| Constructor Summary | |
|---|---|
AbstractRawWormStore(int offsetBits)
|
|
| Method Summary | |
|---|---|
WormAddressManager |
getAddressManager()
The object that knows how to encode, decode, and (de-)serialize addresses. |
int |
getByteCount(long addr)
The length of the datum in bytes. |
long |
getOffset(long addr)
The offset on the store at which the datum is stored. |
int |
getOffsetBits()
The #of bits out of a 64-bit long integer that are used to encode the byte offset as an unsigned integer. |
void |
packAddr(DataOutput out,
long addr)
Pack the address onto the output stream. |
long |
toAddr(int nbytes,
long offset)
Converts a byte count and offset into a long integer. |
String |
toString(long addr)
A human readable representation of the address. |
long |
unpackAddr(DataInput in)
Unpack the address from the input stream. |
| Methods inherited from class com.bigdata.rawstore.AbstractRawStore |
|---|
deserialize, deserialize, deserialize, serialize |
| 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 |
| Field Detail |
|---|
protected final WormAddressManager am
| Constructor Detail |
|---|
public AbstractRawWormStore(int offsetBits)
offsetBits - The #of bits that will be used to represent the byte offset in
the 64-bit long integer addresses for the store. See
WormAddressManager.| Method Detail |
|---|
public final WormAddressManager getAddressManager()
getAddressManager in class AbstractRawStorepublic final int getOffsetBits()
public final long toAddr(int nbytes,
long offset)
IAddressManager
toAddr in interface IAddressManagernbytes - The byte count.offset - The byte offset.
public final long getOffset(long addr)
IAddressManager
getOffset in interface IAddressManageraddr - The opaque identifier that is the within store locator for
some datum.
public final int getByteCount(long addr)
IAddressManager
getByteCount in interface IAddressManageraddr - The opaque identifier that is the within store locator for
some datum.
public final void packAddr(DataOutput out,
long addr)
throws IOException
IAddressManager
packAddr in interface IAddressManagerout - The output stream.addr - The opaque identifier that is the within store locator for
some datum.
IOException
public final long unpackAddr(DataInput in)
throws IOException
IAddressManager
unpackAddr in interface IAddressManagerin - The input stream.
IOExceptionpublic final String toString(long addr)
IAddressManager
toString in interface IAddressManageraddr - The opaque identifier that is the within store locator for
some datum.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||