com.bigdata.rdf.store
Class LocalTripleStore

java.lang.Object
  extended by com.bigdata.relation.AbstractResource<IDatabase<AbstractTripleStore>>
      extended by com.bigdata.rdf.store.AbstractTripleStore
          extended by com.bigdata.rdf.store.AbstractLocalTripleStore
              extended by com.bigdata.rdf.store.LocalTripleStore
All Implemented Interfaces:
IRawTripleStore, IDatabase<AbstractTripleStore>, IMutableDatabase<AbstractTripleStore>, IMutableResource<IDatabase<AbstractTripleStore>>, ILocatableResource<IDatabase<AbstractTripleStore>>

public class LocalTripleStore
extends AbstractLocalTripleStore

A triple store based on the bigdata architecture. This class offers extremely low latency for index operations. All indices are local (in-process) objects and there are no concurrency controls, so point tests on the indices are extremely efficient. Significant parallelism is achieved by paying careful attention to the concurrency constraints imposed by the BTree class (writers are single threaded, reads may be concurrent, but not concurrent with a writer) and by using different views (unisolated vs read-historical) of the indices when computing entailments or performing high-level query.

Version:
$Id: LocalTripleStore.java 4633 2011-06-06 16:01:07Z thompsonbry $
Author:
Bryan Thompson

Nested Class Summary
static interface LocalTripleStore.Options
          Options understood by the LocalTripleStore.
 
Field Summary
protected  Journal store
           
 
Fields inherited from class com.bigdata.rdf.store.AbstractTripleStore
lexicon
 
Fields inherited from interface com.bigdata.rdf.store.IRawTripleStore
NULLSTR
 
Constructor Summary
LocalTripleStore(IIndexManager indexManager, String namespace, Long timestamp, Properties properties)
          Ctor specified by DefaultResourceLocator.
 
Method Summary
 void abort()
          Clears hard references to any indices, relations, etc.
 void close()
          Close the connection to the ITripleStore.
 long commit()
          Delegates the operation to the backing store.
 Journal getIndexManager()
          The backing embedded database.
 boolean isConcurrent()
          When using an ITx.UNISOLATED view, this store is NOT safe for write operations concurrent with either readers or writers.
 boolean isReadOnly()
          True iff the database view is read-only.
 boolean isStable()
          True iff the backing store is stable (exists on disk somewhere and may be closed and re-opened).
 
Methods inherited from class com.bigdata.rdf.store.AbstractLocalTripleStore
getLocalBTreeBytesWritten
 
Methods inherited from class com.bigdata.rdf.store.AbstractTripleStore
__tearDownUnitTest, addNamespace, addStatement, addStatement, addStatements, addStatements, addStatements, addStatements, addTerm, addTerms, assertWritable, asStatement, asStatementIterator, asValue, bulkCompleteStatements, bulkCompleteStatements, bulkCompleteStatements, bulkFilterStatements, bulkFilterStatements, clearNamespaces, computeClosureForStatementIdentifiers, copyStatements, copyStatements, create, destroy, determineAxiomClass, determineVocabularyClass, dumpStatements, dumpStore, dumpStore, dumpStore, dumpStore, dumpStore, fixPointStatementIdentifiers, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAxioms, getBNodeCount, getClosureInstance, getDataLoader, getExplicitStatementCount, getInferenceEngine, getIV, getJustificationCount, getLexiconRelation, getLiteralCount, getMatchProgram, getNamedGraphCount, getNamespace, getNamespaces, getSPOKeyArity, getSPORelation, getStatement, getStatement, getStatement, getStatement, getStatement, getStatementCount, getStatementCount, getStatementCount, getStatementCount, getStatementIdentifiers, getStatements, getStatements, getTerm, getTermCount, getURICount, getValueFactory, getVocabulary, hasStatement, hasStatement, hasStatement, hasStatement, init, isAxiom, isConstrainXXXCShards, isInlineLiterals, isJustify, isOpen, isQuads, isStatementIdentifiers, match, newJoinNexusFactory, newJoinNexusFactory, newJoinNexusFactory, predicateUsage, predicateUsage, relations, removeNamespace, removeStatements, removeStatements, removeStatements, removeStatements, removeStatements, shutdown, toString, toString, toString, toString
 
Methods inherited from class com.bigdata.relation.AbstractResource
acquireExclusiveLock, getBareProperties, getChunkCapacity, getChunkOfChunksCapacity, getChunkTimeout, getCommitTime, getContainer, getContainerNamespace, getExecutorService, getFullyBufferedReadThreshold, getMaxParallelSubqueries, getNamespace, getProperties, getProperty, getProperty, getTimestamp, isForceSerialExecution, toString, unlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.bigdata.relation.locator.ILocatableResource
getContainerNamespace, getNamespace, getTimestamp
 

Field Detail

store

protected final Journal store
Constructor Detail

LocalTripleStore

public LocalTripleStore(IIndexManager indexManager,
                        String namespace,
                        Long timestamp,
                        Properties properties)
Ctor specified by DefaultResourceLocator.

Parameters:
indexManager -
namespace -
timestamp -
properties -
Method Detail

getIndexManager

public Journal getIndexManager()
The backing embedded database.

Overrides:
getIndexManager in class AbstractResource<IDatabase<AbstractTripleStore>>
Returns:
The IIndexManager.

commit

public long commit()
Delegates the operation to the backing store.

Overrides:
commit in class AbstractTripleStore
Returns:
commit time if store supports commit timestamps

abort

public void abort()
Description copied from class: AbstractTripleStore
Clears hard references to any indices, relations, etc. MUST be extended to discard write sets for impls with live indices.

Overrides:
abort in class AbstractTripleStore

isStable

public boolean isStable()
Description copied from class: AbstractTripleStore
True iff the backing store is stable (exists on disk somewhere and may be closed and re-opened).

Note: This is mainly used by the test suites.

Specified by:
isStable in class AbstractTripleStore

isReadOnly

public boolean isReadOnly()
True iff the database view is read-only.

Overrides:
isReadOnly in class AbstractTripleStore

close

public void close()
Close the connection to the ITripleStore.

Overrides:
close in class AbstractTripleStore

isConcurrent

public boolean isConcurrent()
When using an ITx.UNISOLATED view, this store is NOT safe for write operations concurrent with either readers or writers. However, it does support concurrent readers for ITx.READ_COMMITTED and read-historical views.

Specified by:
isConcurrent in class AbstractTripleStore


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