public abstract class AbstractSail extends Object implements Sail
| Modifier and Type | Field and Description |
|---|---|
protected long |
connectionTimeOut
Connection timeout on shutdown (in ms).
|
protected static long |
DEFAULT_CONNECTION_TIMEOUT
Default connection timeout on shutdown: 20,000 milliseconds.
|
protected static long |
DEFAULT_ITERATION_SYNC_THRESHOLD
default value for the Iteration item sync threshold
|
protected ReentrantReadWriteLock |
initializationLock
Lock used to synchronize the initialization state of a sail.
|
| Constructor and Description |
|---|
AbstractSail() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSupportedIsolationLevel(IsolationLevels level)
Appends the provided
IsolationLevels to the SAIL's list of supported isolation levels. |
protected void |
connectionClosed(SailConnection connection)
Signals to the store that the supplied connection has been closed; called by
AbstractSailConnection.close(). |
protected static boolean |
debugEnabled() |
SailConnection |
getConnection()
Opens a connection on the Sail which can be used to query and update data.
|
protected abstract SailConnection |
getConnectionInternal()
Returns a store-specific SailConnection object.
|
File |
getDataDir()
Gets the Sail's data directory.
|
IsolationLevel |
getDefaultIsolationLevel()
Retrieves the default
IsolationLevel level on which transactions in this Sail operate. |
long |
getIterationCacheSyncThreshold()
Retrieves the currently configured threshold for syncing query evaluation iteration caches to disk.
|
List<IsolationLevel> |
getSupportedIsolationLevels()
Retrieve the
IsolationLevels supported by this SAIL, ordered by increasing complexity. |
void |
init()
Initializes the Sail.
|
void |
initialize()
Initializes the Sail.
|
protected void |
initializeInternal()
Do store-specific operations to initialize the store.
|
protected boolean |
isInitialized()
Checks whether the Sail has been initialized.
|
boolean |
isTrackResultSize()
Returns the status of the result size tracking for the query plan.
|
protected void |
removeSupportedIsolationLevel(IsolationLevel level)
Removes all occurrences of the provided
IsolationLevels in the list of supported Isolation levels. |
void |
setConnectionTimeOut(long connectionTimeOut)
Set connection timeout on shutdown (in ms).
|
void |
setDataDir(File dataDir)
Sets the data directory for the Sail.
|
void |
setDefaultIsolationLevel(IsolationLevel defaultIsolationLevel)
Sets the default
IsolationLevel on which transactions in this Sail operate. |
void |
setIterationCacheSyncThreshold(long iterationCacheSyncThreshold)
Set the threshold for syncing query evaluation iteration caches to disk.
|
protected void |
setSupportedIsolationLevels(IsolationLevel... supportedIsolationLevels)
Sets the list of supported
IsolationLevelss for this SAIL. |
protected void |
setSupportedIsolationLevels(List<IsolationLevel> supportedIsolationLevels)
Sets the list of supported
IsolationLevelss for this SAIL. |
void |
setTrackResultSize(boolean trackResultSize)
Enable or disable results size tracking for the query plan.
|
void |
shutDown()
Shuts down the Sail, giving it the opportunity to synchronize any stale data.
|
protected abstract void |
shutDownInternal()
Do store-specific operations to ensure proper shutdown of the store.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetValueFactory, isWritableprotected static final long DEFAULT_CONNECTION_TIMEOUT
protected static final long DEFAULT_ITERATION_SYNC_THRESHOLD
protected final ReentrantReadWriteLock initializationLock
protected volatile long connectionTimeOut
DEFAULT_CONNECTION_TIMEOUT.protected static boolean debugEnabled()
public void setConnectionTimeOut(long connectionTimeOut)
connectionTimeOut - timeout (in ms)public void setDataDir(File dataDir)
Sailinitialized.setDataDir in interface Sailpublic File getDataDir()
SailgetDataDir in interface SailSail.setDataDir(File)protected boolean isInitialized()
initialization
until shutdown.public void initialize()
throws SailException
Sailinitialize in interface SailSailException - If the Sail could not be initialized.public void init()
throws SailException
Sailinit in interface SailSailException - If the Sail could not be initialized.protected void initializeInternal()
throws SailException
SailExceptionpublic void shutDown()
throws SailException
SailshutDown in interface SailSailException - If the Sail object encountered an error or unexpected situation internally.protected abstract void shutDownInternal()
throws SailException
SailExceptionpublic SailConnection getConnection() throws SailException
SailgetConnection in interface SailSailException - If no transaction could be started, for example because the Sail is not writable.protected abstract SailConnection getConnectionInternal() throws SailException
SailExceptionprotected void connectionClosed(SailConnection connection)
AbstractSailConnection.close().connection - The connection that has been closed.protected void addSupportedIsolationLevel(IsolationLevels level)
IsolationLevels to the SAIL's list of supported isolation levels.level - a supported IsolationLevel.protected void removeSupportedIsolationLevel(IsolationLevel level)
IsolationLevels in the list of supported Isolation levels.level - the isolation level to remove.protected void setSupportedIsolationLevels(List<IsolationLevel> supportedIsolationLevels)
IsolationLevelss for this SAIL. The list is expected to be ordered in
increasing complexity.supportedIsolationLevels - a list of supported isolation levels.protected void setSupportedIsolationLevels(IsolationLevel... supportedIsolationLevels)
IsolationLevelss for this SAIL. The list is expected to be ordered in
increasing complexity.supportedIsolationLevels - a list of supported isolation levels.public List<IsolationLevel> getSupportedIsolationLevels()
SailIsolationLevels supported by this SAIL, ordered by increasing complexity.getSupportedIsolationLevels in interface SailIsolationLevel.public IsolationLevel getDefaultIsolationLevel()
SailIsolationLevel level on which transactions in this Sail operate.getDefaultIsolationLevel in interface SailIsolationLevel that will be used with SailConnection.begin(), for SAIL connections
returned by Sail.getConnection().public void setDefaultIsolationLevel(IsolationLevel defaultIsolationLevel)
IsolationLevel on which transactions in this Sail operate.defaultIsolationLevel - The defaultIsolationLevel to set.public long getIterationCacheSyncThreshold()
public void setIterationCacheSyncThreshold(long iterationCacheSyncThreshold)
iterationCacheSyncThreshold - The iterationCacheSyncThreshold to set.public boolean isTrackResultSize()
public void setTrackResultSize(boolean trackResultSize)
trackResultSize - true to enable tracking.Copyright © 2015-2021 Eclipse Foundation. All Rights Reserved.