public class MemoryStore extends AbstractNotifyingSail implements FederatedServiceResolverClient
Modifier and Type | Field and Description |
---|---|
protected static String |
DATA_FILE_NAME |
protected static String |
SYNC_FILE_NAME |
connectionTimeOut, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_ITERATION_SYNC_THRESHOLD, initializationLock
Constructor and Description |
---|
MemoryStore()
Creates a new MemoryStore.
|
MemoryStore(File dataDir)
Creates a new persistent MemoryStore.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cancelSyncTask() |
protected void |
cancelSyncTimer() |
protected NotifyingSailConnection |
getConnectionInternal()
Returns a store-specific SailConnection object.
|
EvaluationStrategyFactory |
getEvaluationStrategyFactory() |
FederatedServiceResolver |
getFederatedServiceResolver() |
boolean |
getPersist() |
long |
getSyncDelay()
Gets the currently configured sync delay.
|
ValueFactory |
getValueFactory()
Gets a ValueFactory object that can be used to create IRI-, blank node-, literal- and statement objects.
|
protected void |
initializeInternal()
Initializes this repository.
|
boolean |
isWritable()
Checks whether this Sail object is writable.
|
void |
notifySailChanged(SailChangedEvent event)
Notifies all registered SailChangedListener's of changes to the contents of this Sail.
|
protected void |
scheduleSyncTask() |
void |
setEvaluationStrategyFactory(EvaluationStrategyFactory factory)
Sets the
EvaluationStrategy to use. |
void |
setFederatedServiceResolver(FederatedServiceResolver resolver)
Overrides the
FederatedServiceResolver used by this instance, but the given resolver is not shutDown when
this instance is. |
void |
setPersist(boolean persist) |
void |
setSyncDelay(long syncDelay)
Sets the time (in milliseconds) to wait after a transaction was commited before writing the changed data to file.
|
protected void |
shutDownInternal()
Do store-specific operations to ensure proper shutdown of the store.
|
void |
sync()
Synchronizes the contents of this repository with the data that is stored on disk.
|
addSailChangedListener, getConnection, removeSailChangedListener
addSupportedIsolationLevel, connectionClosed, debugEnabled, getDataDir, getDefaultIsolationLevel, getIterationCacheSyncThreshold, getSupportedIsolationLevels, init, initialize, isInitialized, isTrackResultSize, removeSupportedIsolationLevel, setConnectionTimeOut, setDataDir, setDefaultIsolationLevel, setIterationCacheSyncThreshold, setSupportedIsolationLevels, setSupportedIsolationLevels, setTrackResultSize, shutDown, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDataDir, getDefaultIsolationLevel, getSupportedIsolationLevels, init, initialize, setDataDir, shutDown
protected static final String DATA_FILE_NAME
protected static final String SYNC_FILE_NAME
public MemoryStore()
public MemoryStore(File dataDir)
dataDir
- the data directory to be used for persistence.public void setPersist(boolean persist)
public boolean getPersist()
public void setSyncDelay(long syncDelay)
The default value for this parameter is 0 (immediate synchronization).
syncDelay
- The sync delay in milliseconds.public long getSyncDelay()
setSyncDelay(long)
public EvaluationStrategyFactory getEvaluationStrategyFactory()
EvaluationStrategy
.public void setEvaluationStrategyFactory(EvaluationStrategyFactory factory)
EvaluationStrategy
to use.public FederatedServiceResolver getFederatedServiceResolver()
public void setFederatedServiceResolver(FederatedServiceResolver resolver)
FederatedServiceResolver
used by this instance, but the given resolver is not shutDown when
this instance is.setFederatedServiceResolver
in interface FederatedServiceResolverClient
resolver
- The SERVICE resolver to set.protected void initializeInternal() throws SailException
initializeInternal
in class AbstractSail
SailException
- when initialization of the store failed.protected void shutDownInternal() throws SailException
AbstractSail
shutDownInternal
in class AbstractSail
SailException
public boolean isWritable()
isWritable
in interface Sail
protected NotifyingSailConnection getConnectionInternal() throws SailException
AbstractSail
getConnectionInternal
in class AbstractNotifyingSail
SailException
public ValueFactory getValueFactory()
Sail
getValueFactory
in interface Sail
public void notifySailChanged(SailChangedEvent event)
AbstractNotifyingSail
notifySailChanged
in class AbstractNotifyingSail
protected void scheduleSyncTask() throws SailException
SailException
protected void cancelSyncTask()
protected void cancelSyncTimer()
public void sync() throws SailException
SailException
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.