Package org.eclipse.rdf4j.sail.helpers
Class SailWrapper
java.lang.Object
org.eclipse.rdf4j.sail.helpers.SailWrapper
- All Implemented Interfaces:
FederatedServiceResolverClient,Sail,StackableSail
- Direct Known Subclasses:
NotifyingSailWrapper
An implementation of the StackableSail interface that wraps another Sail object and forwards any relevant calls to
the wrapped Sail.
- Author:
- Arjohn Kampman
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SailWrapper.SailWrapper(Sail baseSail) Creates a new SailWrapper that wraps the supplied Sail. -
Method Summary
Modifier and TypeMethodDescriptionGets the base Sail that this Sail works on top of.Gets a CollectionFactory that may be optimized for this store and may or may not use disk or other resources.Opens a connection on the Sail which can be used to query and update data.Gets the Sail's data directory.Retrieves the defaultIsolationLevellevel on which transactions in this Sail operate.Gets theFederatedServiceResolverused by this client.Retrieve theIsolationLevels supported by this SAIL, ordered by increasing complexity.Gets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.voidinit()Initializes the Sail.booleanChecks whether this Sail object is writable, i.e.voidsetBaseSail(Sail baseSail) Sets the base Sail that this Sail will work on top of.voidsetDataDir(File dataDir) Sets the data directory for the Sail.voidSets theFederatedServiceResolverto use for this client.voidshutDown()Shuts down the Sail, giving it the opportunity to synchronize any stale data.protected void
-
Constructor Details
-
SailWrapper
public SailWrapper()Creates a new SailWrapper. The base Sail for the created SailWrapper can be set later usingsetBaseSail(org.eclipse.rdf4j.sail.Sail). -
SailWrapper
Creates a new SailWrapper that wraps the supplied Sail.
-
-
Method Details
-
setBaseSail
Description copied from interface:StackableSailSets the base Sail that this Sail will work on top of. This method will be called before the initialize() method is called.- Specified by:
setBaseSailin interfaceStackableSail
-
getBaseSail
Description copied from interface:StackableSailGets the base Sail that this Sail works on top of.- Specified by:
getBaseSailin interfaceStackableSail
-
verifyBaseSailSet
protected void verifyBaseSailSet() -
setFederatedServiceResolver
Description copied from interface:FederatedServiceResolverClientSets theFederatedServiceResolverto use for this client.- Specified by:
setFederatedServiceResolverin interfaceFederatedServiceResolverClient- Parameters:
resolver- The resolver to use.
-
getFederatedServiceResolver
Description copied from interface:FederatedServiceResolverClientGets theFederatedServiceResolverused by this client.- Specified by:
getFederatedServiceResolverin interfaceFederatedServiceResolverClient
-
getDataDir
Description copied from interface:SailGets the Sail's data directory.- Specified by:
getDataDirin interfaceSail- See Also:
-
setDataDir
Description copied from interface:SailSets 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 isinitialized.- Specified by:
setDataDirin interfaceSail
-
init
Description copied from interface:SailInitializes the Sail. Care should be taken that required initialization parameters have been set before this method is called. Please consult the specific Sail implementation for information about the relevant parameters.- Specified by:
initin interfaceSail- Throws:
SailException- If the Sail could not be initialized.
-
shutDown
Description copied from interface:SailShuts 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:
shutDownin interfaceSail- Throws:
SailException- If the Sail object encountered an error or unexpected situation internally.
-
isWritable
Description copied from interface:SailChecks whether this Sail object is writable, i.e. if the data contained in this Sail object can be changed.- Specified by:
isWritablein interfaceSail- Throws:
SailException
-
getConnection
Description copied from interface:SailOpens a connection on the Sail which can be used to query and update data. Depending on how the implementation handles concurrent access, a call to this method might block when there is another open connection on this Sail.- Specified by:
getConnectionin interfaceSail- Throws:
SailException- If no transaction could be started, for example because the Sail is not writable.
-
getValueFactory
Description copied from interface:SailGets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.- Specified by:
getValueFactoryin interfaceSail- Returns:
- a ValueFactory object for this Sail object.
-
getSupportedIsolationLevels
Description copied from interface:SailRetrieve theIsolationLevels supported by this SAIL, ordered by increasing complexity.- Specified by:
getSupportedIsolationLevelsin interfaceSail- Returns:
- a non-empty List of supported Isolation Levels, in order of increasing complexity. Every SAIL supports at
least one
IsolationLevel.
-
getDefaultIsolationLevel
Description copied from interface:SailRetrieves the defaultIsolationLevellevel on which transactions in this Sail operate.- Specified by:
getDefaultIsolationLevelin interfaceSail- Returns:
- the
IsolationLevelthat will be used withSailConnection.begin(), for SAIL connections returned bySail.getConnection().
-
getCollectionFactory
Description copied from interface:SailGets a CollectionFactory that may be optimized for this store and may or may not use disk or other resources.- Specified by:
getCollectionFactoryin interfaceSail- Returns:
- a CollectionFactory
-