public abstract class AbstractRawWormStore extends AbstractRawStore implements IWORM
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| Modifier and Type | Field and Description |
|---|---|
protected WormAddressManager |
am
The object that knows how to encode, decode, and (de-)serialize
addresses.
|
NULL| Constructor and Description |
|---|
AbstractRawWormStore(int offsetBits) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
long |
getPhysicalAddress(long addr)
Determine the unencoded physical address
|
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.
|
delete, getInputStream, getOutputStreamclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, deleteResources, destroy, force, getFile, getResourceMetadata, getUUID, isFullyBuffered, isOpen, isReadOnly, isStable, read, size, writegetCountersprotected final WormAddressManager am
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.public final WormAddressManager getAddressManager()
getAddressManager in class AbstractRawStorepublic final int getOffsetBits()
public final long toAddr(int nbytes,
long offset)
IAddressManagertoAddr in interface IAddressManagernbytes - The byte count.offset - The byte offset.public final long getOffset(long addr)
IAddressManagergetOffset in interface IAddressManageraddr - The opaque identifier that is the within store locator for
some datum.public final long getPhysicalAddress(long addr)
IAddressManagergetPhysicalAddress in interface IAddressManageraddr - The encoded addresspublic final int getByteCount(long addr)
IAddressManagerIRawStore.getByteCount in interface IAddressManageraddr - The opaque identifier that is the within store locator for
some datum.public final String toString(long addr)
IAddressManagertoString in interface IAddressManageraddr - The opaque identifier that is the within store locator for
some datum.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.