public class RDRHistory extends Object implements IChangeLog
<< <s> <p> <o> >> <added>/<removed> "commitTime"^^xsd:long .
| Modifier and Type | Class and Description |
|---|---|
static interface |
RDRHistory.Vocab
Vocab terms to use for the "added" and "removed" predicates.
|
| Modifier and Type | Field and Description |
|---|---|
protected com.bigdata.rdf.sail.RDRHistory.Buffer |
buffer
The spo buffer backed by the temp store.
|
protected AbstractTripleStore |
database
The database.
|
protected TempTripleStore |
tempStore
The temp store used to hold change records until the commit.
|
| Constructor and Description |
|---|
RDRHistory(AbstractTripleStore database) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accept(IChangeRecord record)
Subclasses can override this to only record history on certain change
events.
|
void |
changeEvent(IChangeRecord record)
Write the change record to the temp store.
|
void |
close()
Close out the temp store.
|
protected com.bigdata.rdf.sail.RDRHistory.Buffer |
getOrCreateBuffer()
Get the buffer, create it if necessary.
|
void |
init()
Give subclasses the opportunity for any initialization, including
obtaining the IVs for the "added" and "removed" terms.
|
TempTripleStore |
newTempTripleStore()
Stolen from
TruthMaintenance.newTempTripleStore(). |
protected IV<?,?>[] |
resolveTerms(org.openrdf.model.URI[] terms)
Helper method to resolve added and removed terms.
|
void |
transactionAborted()
Close out the temp store.
|
void |
transactionBegin()
Noop.
|
void |
transactionCommited(long commitTime)
Copy the statements from the temp store into the database, replacing the
object position of each statement with the commit time, then close
out the temp store.
|
void |
transactionPrepare()
Noop.
|
protected final AbstractTripleStore database
protected TempTripleStore tempStore
protected com.bigdata.rdf.sail.RDRHistory.Buffer buffer
public RDRHistory(AbstractTripleStore database)
public void init()
protected IV<?,?>[] resolveTerms(org.openrdf.model.URI[] terms) throws Exception
Exceptionpublic TempTripleStore newTempTripleStore()
TruthMaintenance.newTempTripleStore().public void changeEvent(IChangeRecord record)
changeEvent in interface IChangeLogrecord - the IChangeRecordprotected boolean accept(IChangeRecord record)
record - change eventprotected com.bigdata.rdf.sail.RDRHistory.Buffer getOrCreateBuffer()
public void transactionBegin()
transactionBegin in interface IChangeLogpublic void transactionPrepare()
transactionPrepare in interface IChangeLogpublic void transactionCommited(long commitTime)
transactionCommited in interface IChangeLogcommitTime - The timestamp associated with the commit point.public void transactionAborted()
transactionAborted in interface IChangeLogpublic void close()
close in interface IChangeLogCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.