com.bigdata.rdf.inf
Class SPOAssertionBuffer

java.lang.Object
  extended by com.bigdata.rdf.inf.AbstractSPOBuffer
      extended by com.bigdata.rdf.inf.SPOAssertionBuffer
All Implemented Interfaces:
ISPOAssertionBuffer, ISPOBuffer

Deprecated. by AbstractElementBuffer.InsertBuffer and AbstractSolutionBuffer.InsertSolutionBuffer and the changes to how truth maintenance is handled (by rule rewrites).

public class SPOAssertionBuffer
extends AbstractSPOBuffer
implements ISPOAssertionBuffer

A buffer for ISPOs and optional Justifications that is flushed on overflow into a backing AbstractTripleStore.

Version:
$Id: SPOAssertionBuffer.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected  boolean justify
          Deprecated. true iff the Truth Maintenance strategy requires that we focusStore Justifications for entailments.
 
Fields inherited from class com.bigdata.rdf.inf.AbstractSPOBuffer
capacity, filter, numStmts, stmts
 
Fields inherited from interface com.bigdata.rdf.spo.ISPOBuffer
DEBUG, INFO, log
 
Constructor Summary
SPOAssertionBuffer(AbstractTripleStore focusStore, AbstractTripleStore db, IElementFilter<ISPO> filter, int capacity, boolean justified)
          Deprecated. Create a buffer.
 
Method Summary
 boolean add(SPO stmt, Justification justification)
          Deprecated. When the buffer is nearCapacity() the statements in the buffer will be flushed into the backing focusStore.
 void dump(AbstractTripleStore store)
          Deprecated. Dumps the state of the buffer on System.err.
 int flush()
          Deprecated. Flush any buffered statements to the backing store.
 AbstractTripleStore getFocusStore()
          Deprecated. The focusStore on which the entailments computed by closure will be written.
 int getJustificationCount()
          Deprecated. The #of justifications currently in the buffer.
protected  boolean nearCapacity()
          Deprecated. Returns true iff there is no more space remaining in the buffer.
 
Methods inherited from class com.bigdata.rdf.inf.AbstractSPOBuffer
add, get, getTermDatabase, isEmpty, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.bigdata.rdf.spo.ISPOBuffer
add, isEmpty, size
 

Field Detail

justify

protected final boolean justify
Deprecated. 
true iff the Truth Maintenance strategy requires that we focusStore Justifications for entailments.

Constructor Detail

SPOAssertionBuffer

public SPOAssertionBuffer(AbstractTripleStore focusStore,
                          AbstractTripleStore db,
                          IElementFilter<ISPO> filter,
                          int capacity,
                          boolean justified)
Deprecated. 
Create a buffer.

Parameters:
focusStore - The focusStore on which the entailments computed by closure will be written (required). This is either the database or a temporary focusStore used during incremental TM.
db - The database in which the terms are defined (required).
filter - Option filter. When present statements matched by the filter are NOT retained by the SPOAssertionBuffer and will NOT be added to the focusStore.
capacity - The maximum SPOs that the buffer can hold before it is flush()ed.
justified - true iff the Truth Maintenance strategy requires that we focusStore Justifications for entailments.
Method Detail

getFocusStore

public AbstractTripleStore getFocusStore()
Deprecated. 
The focusStore on which the entailments computed by closure will be written. This may be either the database or a temporary focusStore used during incremental TM.


getJustificationCount

public int getJustificationCount()
Deprecated. 
Description copied from interface: ISPOAssertionBuffer
The #of justifications currently in the buffer.

Specified by:
getJustificationCount in interface ISPOAssertionBuffer

nearCapacity

protected boolean nearCapacity()
Deprecated. 
Returns true iff there is no more space remaining in the buffer. Under those conditions adding another statement to the buffer could cause an overflow.

Overrides:
nearCapacity in class AbstractSPOBuffer
Returns:
True if the buffer might overflow if another statement were added.

flush

public int flush()
Deprecated. 
Description copied from interface: ISPOBuffer
Flush any buffered statements to the backing store.

Specified by:
flush in interface ISPOBuffer
Specified by:
flush in class AbstractSPOBuffer
Returns:
The cumulative #of statements that were written on the indices since the last time the counter was reset. A statement that was previously an axiom or inferred and that is converted to an explicit statement by this method will be reported in this count as well as any statement that was not pre-existing in the database. Statement removal also counts as a "write".
See Also:
#flush(boolean)

add

public boolean add(SPO stmt,
                   Justification justification)
Deprecated. 
When the buffer is nearCapacity() the statements in the buffer will be flushed into the backing focusStore.

Specified by:
add in interface ISPOAssertionBuffer
See Also:
nearCapacity(), flush()

dump

public void dump(AbstractTripleStore store)
Deprecated. 
Description copied from class: AbstractSPOBuffer
Dumps the state of the buffer on System.err.

Overrides:
dump in class AbstractSPOBuffer
Parameters:
store - Used to resolve the term identifiers to Values.
TODO:
also dump the justifications.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.