public class RawStoreDelegate extends Object implements IRawStore
| Modifier and Type | Field and Description |
|---|---|
protected IRawStore |
delegate |
NULL| Constructor and Description |
|---|
RawStoreDelegate(IRawStore delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the store immediately.
|
void |
delete(long addr)
Delete the data (unisolated).
|
void |
deleteResources()
Deletes the backing file(s) (if any).
|
void |
destroy()
Closes the store immediately (if open) and deletes its persistent
resources.
|
void |
force(boolean metadata)
Force the data to stable storage.
|
int |
getByteCount(long addr)
The length of the datum in bytes.
|
CounterSet |
getCounters()
Return performance counters.
|
File |
getFile()
The backing file -or-
null if there is no backing file
for the store. |
InputStream |
getInputStream(long addr)
Return an input stream from which a previously written stream may be read
back.
|
long |
getOffset(long addr)
The offset on the store at which the datum is stored.
|
IPSOutputStream |
getOutputStream()
Return an output stream which can be used to write on the backing store.
|
long |
getPhysicalAddress(long addr)
Determine the unencoded physical address
|
IResourceMetadata |
getResourceMetadata()
A description of this store in support of the scale-out architecture.
|
UUID |
getUUID()
|
boolean |
isFullyBuffered()
True iff the store is fully buffered (all reads are against memory).
|
boolean |
isOpen()
true iff the store is open. |
boolean |
isReadOnly()
true iff the store does not allow writes. |
boolean |
isStable()
True iff backed by stable storage.
|
ByteBuffer |
read(long addr)
Read the data (unisolated).
|
long |
size()
The #of application data bytes written on the store (does not count any
headers or root blocks that may exist for the store).
|
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 |
write(ByteBuffer data)
Write the data (unisolated).
|
protected final IRawStore delegate
public RawStoreDelegate(IRawStore delegate)
public void close()
IRawStorepublic void delete(long addr)
IRawStoreAfter this operation subsequent reads on the address MAY fail and the caller MUST NOT depend on the ability to read at that address.
public void deleteResources()
IRawStoredeleteResources in interface IRawStorepublic void destroy()
IRawStoreIllegalStateException if the store
is already closed, but still deletes the backing resources.destroy in interface IRawStoreIRawStore.deleteResources()public void force(boolean metadata)
IRawStorepublic int getByteCount(long addr)
IAddressManagerIRawStore.getByteCount in interface IAddressManageraddr - The opaque identifier that is the within store locator for
some datum.public CounterSet getCounters()
ICounterSetAccessgetCounters in interface ICounterSetAccesspublic File getFile()
IRawStorenull if there is no backing file
for the store.public long getOffset(long addr)
IAddressManagergetOffset in interface IAddressManageraddr - The opaque identifier that is the within store locator for
some datum.public long getPhysicalAddress(long addr)
IAddressManagergetPhysicalAddress in interface IAddressManageraddr - The encoded addresspublic IResourceMetadata getResourceMetadata()
IRawStoregetResourceMetadata in interface IRawStorepublic boolean isFullyBuffered()
IRawStoreNote: This does not guarantee that the OS will not swap the buffer onto disk.
isFullyBuffered in interface IRawStorepublic boolean isOpen()
IRawStoretrue iff the store is open.public boolean isReadOnly()
IRawStoretrue iff the store does not allow writes.isReadOnly in interface IRawStorepublic boolean isStable()
IRawStorepublic ByteBuffer read(long addr)
IRawStoreread in interface IRawStoreaddr - A long integer that encodes both the offset from which the
data will be read and the #of bytes to be read. See
IAddressManager.toAddr(int, long).public long size()
IRawStorepublic long toAddr(int nbytes,
long offset)
IAddressManagertoAddr in interface IAddressManagernbytes - The byte count.offset - The byte offset.public String toString(long addr)
IAddressManagertoString in interface IAddressManageraddr - The opaque identifier that is the within store locator for
some datum.public long write(ByteBuffer data)
IRawStorewrite in interface IRawStoredata - The data. The bytes from the current
Buffer.position() to the
Buffer.limit() will be written and the
Buffer.position() will be advanced to the
Buffer.limit() . The caller may subsequently
modify the contents of the buffer without changing the state
of the store (i.e., the data are copied into the store).IAddressManager.public IPSOutputStream getOutputStream()
IStreamStoreIPSOutputStream.getOutputStream in interface IStreamStorepublic InputStream getInputStream(long addr)
IStreamStoregetInputStream in interface IStreamStoreaddr - The address at which the stream was written.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.