public class TempTripleStore extends AbstractLocalTripleStore
TemporaryStore.
Note: the TempTripleStore declares indices that do NOT support
isolation. This offers a significant performance boost when you do not need
transactions or the ability to purge historical data versions from the store
as they age.
Note: Users of the TempTripleStore may find it worthwhile to turn off
a variety of options in order to minimize the time and space burden of the
temporary store depending on the use which will be made of it, including
AbstractTripleStore.Options.LEXICON and AbstractTripleStore.Options.ONE_ACCESS_PATH.
Note: Multiple KBs MAY be created in the backing TemporaryStore but
all MUST be assigned the TemporaryRawStore.getUUID() as their prefix in
order to avoid possible conflicts within a global namespace. This is
especially important when the relations in the TemporaryStore are
resolvable by an IBigdataFederation or Journal.
Note: This class is often used to support inference. When so used, the
statement indices are populated with the term identifiers from the main
database and the SPORelation in the TempTripleStore is
disabled using AbstractTripleStore.Options.LEXICON.
Note: If you want an in-memory ITripleStore that supports commit and
abort then use a LocalTripleStore and specify
Options.BUFFER_MODE as
BufferMode.Temporary or as BufferMode.Transient if you want
the triple store to begin in memory and overflow to disk if necessary. Both
of these configurations provide full concurrency control and group commit.
| Modifier and Type | Class and Description |
|---|---|
static interface |
TempTripleStore.Options |
DEBUG, INFO, lexiconindexManagerNULLSTR| Constructor and Description |
|---|
TempTripleStore(IIndexManager indexManager,
String namespace,
Long timestamp,
Properties properties)
Ctor specified by
DefaultResourceLocator. |
TempTripleStore(Properties properties)
Deprecated.
by
TempTripleStore(TemporaryStore, Properties, AbstractTripleStore)
which permits you to reuse the same backing
TemporaryStore instance until it becomes full. |
TempTripleStore(Properties properties,
AbstractTripleStore db)
Deprecated.
Use
TempTripleStore(TemporaryStore, Properties, AbstractTripleStore)
instead and provide the TemporaryStore reference
returned by IIndexStore.getTempStore(). This has the
advantage of reusing a single shared TemporaryStore
instance until it becomes "large" and then allocating a new
instance (note that each instance will consume a direct
ByteBuffer from the DirectBufferPool). This
is especially important for operations like
TruthMaintenance which have to create a lot of
temporary stores. |
TempTripleStore(TemporaryStore store,
Properties properties,
AbstractTripleStore db)
Variant for creating a(nother)
TempTripleStore on the same
TemporaryStore. |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Not supported.
|
void |
close()
Causes the
TempTripleStore to be AbstractTripleStore.destroy()ed, but does
not reclaim space in the backing TemporaryStore and does not
close the backing TemporaryStore. |
long |
commit()
NOP.
|
TemporaryStore |
getIndexManager()
Return the object used to locate indices, relations, and relation
containers and to execute operations on those resources.
|
boolean |
isConcurrent()
This store is NOT safe for concurrent operations on an
ITx.UNISOLATED index. |
boolean |
isStable()
True iff the backing store is stable (exists on disk somewhere and may be
closed and re-opened).
|
getLocalBTreeBytesWritten__tearDownUnitTest, addNamespace, addStatement, addStatement, addStatements, addStatements, addStatements, addStatements, addTerm, addTerms, asStatement, asStatementIterator, asValue, bulkCompleteStatements, bulkCompleteStatements, bulkCompleteStatements, bulkFilterStatements, bulkFilterStatements, clearNamespaces, computeClosureForStatementIdentifiers, copyStatements, copyStatements, create, destroy, determineAxiomClass, determineVocabularyClass, dumpStatements, dumpStore, dumpStore, dumpStore, dumpStore, dumpStore, dumpStore, dumpStore, fixPointStatementIdentifiers, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAccessPath, getAxioms, getBNodeCount, getClosureInstance, getDataLoader, getExplicitStatementCount, getGeoSpatialConfig, getInferenceEngine, getIV, getJustificationCount, getLexiconRelation, getLiteralCount, getMatchProgram, getNamedGraphCount, getNamespace, getNamespaces, getPredicate, getPredicate, getPredicate, getRDRHistoryInstance, getSPOKeyArity, getSPORelation, getStatement, getStatement, getStatement, getStatement, getStatement, getStatementCount, getStatementCount, getStatementCount, getStatementCount, getStatementIdentifiers, getStatements, getStatements, getStatements, getTerm, getTermCount, getURICount, getValueFactory, getVocabulary, hasStatement, hasStatement, hasStatement, hasStatement, init, isAxiom, isBottomUpEvaluation, isConstrainXXXCShards, isInlineLiterals, isJustify, isOpen, isQuads, isRDRHistory, isStatementIdentifiers, match, newJoinNexusFactory, newJoinNexusFactory, newJoinNexusFactory, relations, removeNamespace, removeStatements, removeStatements, removeStatements, removeStatements, removeStatements, shutdown, toString, toString, toString, toStringacquireExclusiveLock, assertWritable, getBareProperties, getChunkCapacity, getChunkOfChunksCapacity, getChunkTimeout, getCommitTime, getContainer, getContainerNamespace, getExecutorService, getFullyBufferedReadThreshold, getMaxParallelSubqueries, getNamespace, getProperties, getProperty, getProperty, getTimestamp, isForceSerialExecution, isReadOnly, toString, unlockclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisReadOnlygetContainerNamespace, getNamespace, getTimestamppublic TempTripleStore(Properties properties)
TempTripleStore(TemporaryStore, Properties, AbstractTripleStore)
which permits you to reuse the same backing
TemporaryStore instance until it becomes full.ITripleStore backed by a new
TemporaryStore.properties - See TempTripleStore.Options.public TempTripleStore(Properties properties, AbstractTripleStore db)
TempTripleStore(TemporaryStore, Properties, AbstractTripleStore)
instead and provide the TemporaryStore reference
returned by IIndexStore.getTempStore(). This has the
advantage of reusing a single shared TemporaryStore
instance until it becomes "large" and then allocating a new
instance (note that each instance will consume a direct
ByteBuffer from the DirectBufferPool). This
is especially important for operations like
TruthMaintenance which have to create a lot of
temporary stores.ITripleStore backed by a new
TemporaryStore. The ITripleStore will default its
properties based on those specified for the optional db and then
override those defaults using the given properties.
Note: This variant is especially useful when the TempTripleStore
will have its own lexicon and you need it to be compatible with the
lexicon for the db.
Note: When db is non-null, the relations on the
TempTripleStore will be locatable by the specified db.
properties - Overrides for the database's properties.db - The optional database (a) will establish the defaults for the
TempTripleStore; and (b) will be able to locate
relations declared on the backing TemporaryStore.public TempTripleStore(TemporaryStore store, Properties properties, AbstractTripleStore db)
TempTripleStore on the same
TemporaryStore. The TempTripleStore will have its own
namespace.store - The TemporaryStore.properties - Overrides for the database's properties.db - The optional database (a) will establish the defaults for the
TempTripleStore; and (b) will be able to locate
relations declared on the backing TemporaryStore.public TempTripleStore(IIndexManager indexManager, String namespace, Long timestamp, Properties properties)
DefaultResourceLocator.indexManager - namespace - timestamp - properties - public TemporaryStore getIndexManager()
AbstractResourceNote: For scale-out, this is always the federation's index manager NOT the data service local index manager. This is an artifact of how we resolve the metadata for the relation against the global row store.
getIndexManager in class AbstractResource<IDatabase<AbstractTripleStore>>IIndexManager.public final long commit()
Note: since multiple TempTripleStores may be created on the same
backing TemporaryStore it is NOT safe to perform a
TemporaryStore#checkpoint(). There is no coordination of write
access to the indices so the checkpoint can not be atomic. Therefore this
method is a NOP and abort() will throw an exception.
commit in interface ITripleStorecommit in class AbstractTripleStorepublic final void abort()
abort in interface ITripleStoreabort in class AbstractTripleStoreUnsupportedOperationExceptionpublic final boolean isStable()
AbstractTripleStoreNote: This is mainly used by the test suites.
isStable in class AbstractTripleStorepublic final void close()
TempTripleStore to be AbstractTripleStore.destroy()ed, but does
not reclaim space in the backing TemporaryStore and does not
close the backing TemporaryStore.close in interface ITripleStoreclose in class AbstractTripleStorepublic boolean isConcurrent()
ITx.UNISOLATED index. However, it does support concurrent readers
on the ITx.READ_COMMITTED view of an index.isConcurrent in class AbstractTripleStoreCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.