Package org.eclipse.rdf4j.sail.lmdb
Class LmdbStore
java.lang.Object
org.eclipse.rdf4j.sail.helpers.AbstractSail
org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail
org.eclipse.rdf4j.sail.lmdb.LmdbStore
- All Implemented Interfaces:
FederatedServiceResolverClient
,NotifyingSail
,Sail
@Experimental
public class LmdbStore
extends AbstractNotifyingSail
implements FederatedServiceResolverClient
A SAIL implementation using LMDB for storing and querying its data.
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_ITERATION_SYNC_THRESHOLD, initializationLock
-
Constructor Summary
ConstructorDescriptionCreates a new LmdbStore with default settings.Creates a new LmdbStore with default settings.LmdbStore
(File dataDir, LmdbStoreConfig config) LmdbStore
(LmdbStoreConfig config) Creates a new LmdbStore. -
Method Summary
Modifier and TypeMethodDescriptionprotected NotifyingSailConnection
Returns a store-specific SailConnection object.protected Lock
getTransactionLock
(IsolationLevel level) This call will block whenIsolationLevels.NONE
is provided when there are active transactions with a higher isolation and block when a higher isolation is provided when there are active transactions withIsolationLevels.NONE
isolation.Gets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.protected void
Initializes this LmdbStore.boolean
Checks whether this Sail object is writable, i.e.void
setDataDir
(File dataDir) Sets the data directory for the Sail.void
Sets theEvaluationStrategy
to use.void
Overrides theFederatedServiceResolver
used by this instance, but the given resolver is not shutDown when this instance is.void
shutDown()
Shuts down the Sail, giving it the opportunity to synchronize any stale data.protected void
Do store-specific operations to ensure proper shutdown of the store.Methods inherited from class org.eclipse.rdf4j.sail.helpers.AbstractNotifyingSail
addSailChangedListener, getConnection, notifySailChanged, removeSailChangedListener
Methods inherited from class org.eclipse.rdf4j.sail.helpers.AbstractSail
addSupportedIsolationLevel, connectionClosed, debugEnabled, getDataDir, getDefaultIsolationLevel, getIterationCacheSyncThreshold, getSupportedIsolationLevels, init, isInitialized, isTrackResultSize, removeSupportedIsolationLevel, setConnectionTimeOut, setDefaultIsolationLevel, setIterationCacheSyncThreshold, setSupportedIsolationLevels, setSupportedIsolationLevels, setTrackResultSize, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.sail.Sail
getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, init
-
Constructor Details
-
LmdbStore
public LmdbStore()Creates a new LmdbStore with default settings. -
LmdbStore
Creates a new LmdbStore. -
LmdbStore
Creates a new LmdbStore with default settings. -
LmdbStore
-
-
Method Details
-
setDataDir
Description copied from interface:Sail
Sets the data directory for the Sail. The Sail can use this directory for storage of data, parameters, etc. This directory must be set before the Sail isinvalid @link
initialized
- Specified by:
setDataDir
in interfaceSail
- Overrides:
setDataDir
in classAbstractSail
-
getEvaluationStrategyFactory
- Returns:
- Returns the
EvaluationStrategy
.
-
setEvaluationStrategyFactory
Sets theEvaluationStrategy
to use. -
getFederatedServiceResolver
- Returns:
- Returns the SERVICE resolver.
-
setFederatedServiceResolver
Overrides theFederatedServiceResolver
used by this instance, but the given resolver is not shutDown when this instance is.- Specified by:
setFederatedServiceResolver
in interfaceFederatedServiceResolverClient
- Parameters:
resolver
- The SERVICE resolver to set.
-
initializeInternal
Initializes this LmdbStore.- Overrides:
initializeInternal
in classAbstractSail
- Throws:
SailException
- If this LmdbStore could not be initialized using the parameters that have been set.
-
shutDownInternal
Description copied from class:AbstractSail
Do store-specific operations to ensure proper shutdown of the store.- Specified by:
shutDownInternal
in classAbstractSail
- Throws:
SailException
-
shutDown
Description copied from interface:Sail
Shuts down the Sail, giving it the opportunity to synchronize any stale data. Care should be taken that all initialized Sails are being shut down before an application exits to avoid potential loss of data. Once shut down, a Sail can no longer be used until it is re-initialized.- Specified by:
shutDown
in interfaceSail
- Overrides:
shutDown
in classAbstractSail
- Throws:
SailException
- If the Sail object encountered an error or unexpected situation internally.
-
isWritable
public boolean isWritable()Description copied from interface:Sail
Checks whether this Sail object is writable, i.e. if the data contained in this Sail object can be changed.- Specified by:
isWritable
in interfaceSail
-
getConnectionInternal
Description copied from class:AbstractSail
Returns a store-specific SailConnection object.- Specified by:
getConnectionInternal
in classAbstractNotifyingSail
- Returns:
- A connection to the store.
- Throws:
SailException
-
getValueFactory
Description copied from interface:Sail
Gets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.- Specified by:
getValueFactory
in interfaceSail
- Returns:
- a ValueFactory object for this Sail object.
-
getTransactionLock
This call will block whenIsolationLevels.NONE
is provided when there are active transactions with a higher isolation and block when a higher isolation is provided when there are active transactions withIsolationLevels.NONE
isolation. Store is either exclusively inIsolationLevels.NONE
isolation with potentially zero or more transactions, or exclusively in higher isolation mode with potentially zero or more transactions.- Parameters:
level
- indicating desired modeIsolationLevels.NONE
or higher- Returns:
- Lock used to prevent Store from switching isolation modes
- Throws:
SailException
-