public class NativeStore extends NotifyingSailBase
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, initializationLock, logger
Constructor and Description |
---|
NativeStore()
Creates a new NativeStore.
|
NativeStore(File dataDir) |
NativeStore(File dataDir,
String tripleIndexes) |
Modifier and Type | Method and Description |
---|---|
protected double |
cardinality(Resource subj,
URI pred,
Value obj,
Resource context) |
protected CloseableIteration<? extends Statement,IOException> |
createStatementIterator(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
boolean readTransaction,
Resource... contexts)
Creates a statement iterator based on the supplied pattern.
|
protected NotifyingSailConnection |
getConnectionInternal()
Returns a store-specific SailConnection object.
|
protected CloseableIteration<Resource,IOException> |
getContextIDs(boolean readTransaction) |
protected List<Integer> |
getContextIDs(Resource... contexts) |
boolean |
getForceSync() |
protected org.openrdf.sail.nativerdf.NamespaceStore |
getNamespaceStore() |
protected Lock |
getTransactionLock() |
String |
getTripleIndexes() |
protected org.openrdf.sail.nativerdf.TripleStore |
getTripleStore() |
ValueFactory |
getValueFactory()
Gets a ValueFactory object that can be used to create URI-, blank node-,
literal- and statement objects.
|
protected ValueStore |
getValueStore() |
protected void |
initializeInternal()
Initializes this NativeStore.
|
boolean |
isWritable()
Checks whether this Sail object is writable, i.e.
|
void |
setForceSync(boolean forceSync)
Specifiec whether updates should be synced to disk forcefully, must be
called before initialization.
|
void |
setNamespaceCacheSize(int namespaceCacheSize) |
void |
setNamespaceIDCacheSize(int namespaceIDCacheSize) |
void |
setTripleIndexes(String tripleIndexes)
Sets the triple indexes for the native store, must be called before
initialization.
|
void |
setValueCacheSize(int valueCacheSize) |
void |
setValueIDCacheSize(int valueIDCacheSize) |
protected void |
shutDownInternal()
Do store-specific operations to ensure proper shutdown of the store.
|
addSailChangedListener, getConnection, notifySailChanged, removeSailChangedListener
connectionClosed, debugEnabled, getDataDir, initialize, isInitialized, setDataDir, shutDown, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDataDir, initialize, setDataDir, shutDown
public NativeStore()
public NativeStore(File dataDir)
public void setTripleIndexes(String tripleIndexes)
tripleIndexes
- An index strings, e.g. spoc,posc.public String getTripleIndexes()
public void setForceSync(boolean forceSync)
public boolean getForceSync()
public void setValueCacheSize(int valueCacheSize)
public void setValueIDCacheSize(int valueIDCacheSize)
public void setNamespaceCacheSize(int namespaceCacheSize)
public void setNamespaceIDCacheSize(int namespaceIDCacheSize)
protected void initializeInternal() throws SailException
initializeInternal
in class SailBase
SailException
- If this NativeStore could not be initialized using the
parameters that have been set.protected void shutDownInternal() throws SailException
SailBase
shutDownInternal
in class SailBase
SailException
public boolean isWritable()
Sail
protected NotifyingSailConnection getConnectionInternal() throws SailException
SailBase
getConnectionInternal
in class NotifyingSailBase
SailException
public ValueFactory getValueFactory()
Sail
protected org.openrdf.sail.nativerdf.TripleStore getTripleStore()
protected ValueStore getValueStore()
protected org.openrdf.sail.nativerdf.NamespaceStore getNamespaceStore()
protected Lock getTransactionLock() throws SailException
SailException
protected List<Integer> getContextIDs(Resource... contexts) throws IOException
IOException
protected CloseableIteration<Resource,IOException> getContextIDs(boolean readTransaction) throws IOException
IOException
protected CloseableIteration<? extends Statement,IOException> createStatementIterator(Resource subj, URI pred, Value obj, boolean includeInferred, boolean readTransaction, Resource... contexts) throws IOException
subj
- The subject of the pattern, or null to indicate a
wildcard.pred
- The predicate of the pattern, or null to indicate a
wildcard.obj
- The object of the pattern, or null to indicate a wildcard.contexts
- The context(s) of the pattern. Note that this parameter is a vararg
and as such is optional. If no contexts are supplied the method
operates on the entire repository.IOException
protected double cardinality(Resource subj, URI pred, Value obj, Resource context) throws IOException
IOException
Copyright © 2001-2013 Aduna. All Rights Reserved.