public final class SolutionSetStream extends Stream implements ISolutionSet
Stream.CompressionEnum, Stream.StreamIndexMetadataentryCount, error, ERROR_CLOSED, ERROR_ERROR_STATE, ERROR_READ_ONLY, metadata, open, rootAddr| Constructor and Description |
|---|
SolutionSetStream(IRawStore store,
Checkpoint checkpoint,
IndexMetadata metadata,
boolean readOnly)
Required constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
static SolutionSetStream |
create(IRawStore store,
Stream.StreamIndexMetadata metadata)
Create a stream for an ordered solution set.
|
BaseIndexStats |
dumpPages(boolean recursive,
boolean visitLeaves)
Reports statistics for the index.
|
protected void |
flush()
Hook to flush anything which is dirty to the backing store.
|
ICloseableIterator<IBindingSet[]> |
get()
Return an
ICloseableIterator reading the solutions from the
stream. |
ISolutionSetStats |
getStats()
Return the
ISolutionSetStats for the saved solution set. |
long |
getStatsAddr()
Return the address of the
ISolutionSetStats to be written into the
next Checkpoint record. |
protected boolean |
needsCheckpoint()
Return true iff changes would be lost unless the
Stream is
flushed to the backing store using Stream.writeCheckpoint(). |
void |
put(ICloseableIterator<IBindingSet[]> src2)
Replace the contents of the stream with the solutions read from the
source.
|
ICloseableIterator<IBindingSet> |
scan()
Visit all entries in the index in the natural order of the index
(dereferencing visited tuples to the application objects stored within
those tuples).
|
protected void |
setCheckpoint(Checkpoint checkpoint)
Sets the
Stream.checkpoint and initializes the mutable fields from the
checkpoint record. |
void |
write(ICloseableIterator<?> src)
Write entries onto the stream.
|
assertNotReadOnly, assertNotTransient, close, fireDirtyEvent, getCheckpoint, getCounters, getDirtyListener, getIndexMetadata, getLastCommitTime, getMetadataAddr, getReadLockCount, getRecordVersion, getRootAddr, getStore, handleCommit, invalidate, isOpen, isReadOnly, load, rangeCount, readLock, recycle, removeAll, reopen, setDirtyListener, setLastCommitTime, wrapInputStream, wrapOutputStream, writeCheckpoint, writeCheckpoint2, writeLockclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getCheckpoint, getDirtyListener, getIndexMetadata, getLastCommitTime, getMetadataAddr, getRecordVersion, getRootAddr, isOpen, reopen, setDirtyListener, setLastCommitTime, writeCheckpoint, writeCheckpoint2handleCommit, invalidategetCountersgetStore, rangeCount, removeAllgetReadLockCount, isReadOnly, readLock, writeLockpublic SolutionSetStream(IRawStore store, Checkpoint checkpoint, IndexMetadata metadata, boolean readOnly)
Checkpoint record.store - The store.checkpoint - The Checkpoint record.metadata - The metadata record.readOnly - When true the view will be immutable.Stream.create(IRawStore, StreamIndexMetadata),
Stream.load(IRawStore, long, boolean)public static SolutionSetStream create(IRawStore store, Stream.StreamIndexMetadata metadata)
FIXME GIST : This is not setting the SolutionSetStream class when invoked
by Checkpoint.create(IRawStore, IndexMetadata) since
Stream.create() is being invoked rather than SolutionSetStream.create().
public ISolutionSetStats getStats()
ISolutionSetStats for the saved solution set.getStats in interface ISolutionSetISolutionSetStats.public long getStatsAddr()
ISolutionSetStats to be written into the
next Checkpoint record. The caller must have flush() the
SolutionSetStream as a pre-condition (to ensure that the stats
have been written out). If the ISolutionSetStats are not loaded,
then the address from the last Checkpoint record is returned.public ICloseableIterator<IBindingSet[]> get()
ISolutionSetICloseableIterator reading the solutions from the
stream.get in interface ISolutionSetpublic void put(ICloseableIterator<IBindingSet[]> src2)
ISolutionSetput in interface ISolutionSetsrc2 - The source.public ICloseableIterator<IBindingSet> scan()
ISimpleIndexAccessscan in interface ISolutionSetscan in interface ISimpleIndexAccessscan in class Streamprotected boolean needsCheckpoint()
StreamStream is
flushed to the backing store using Stream.writeCheckpoint().needsCheckpoint in class Streamtrue true iff changes would be lost unless the
Stream was flushed to the backing store using
Stream.writeCheckpoint().protected void flush()
StreamStream._writeCheckpoint2().protected void setCheckpoint(Checkpoint checkpoint)
Stream.checkpoint and initializes the mutable fields from the
checkpoint record. In order for this operation to be atomic, the caller
must be synchronized on the BTree or otherwise guaranteed to have
exclusive access, e.g., during the ctor or when the BTree is
mutable and access is therefore required to be single-threaded.
Extended to persist the ISolutionSetStats.
setCheckpoint in class Streampublic void write(ICloseableIterator<?> src)
Streampublic BaseIndexStats dumpPages(boolean recursive, boolean visitLeaves)
ICheckpointProtocoldumpPages in interface ICheckpointProtocolrecursive - When true, also collects statistics on the pages
(nodes and leaves) using a low-level approach.visitLeaves - When true and recursive:=true then the
leaves of the index are also visited.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.