public abstract class OAbstractPaginatedStorage extends OStorageAbstract implements OLowDiskSpaceListener, OCheckpointRequestListener, OIdentifiableStorage, OBackgroundExceptionListener, OFreezableStorageComponent, OPageIsBrokenListener
Modifier and Type | Class and Description |
---|---|
protected static class |
OAbstractPaginatedStorage.StartupMetadata |
OStorage.LOCKING_STRATEGY, OStorage.STATUS
Modifier and Type | Field and Description |
---|---|
protected OAtomicOperationsManager |
atomicOperationsManager |
protected AtomicOperationsTable |
atomicOperationsTable |
protected static OScheduledThreadPoolExecutorWithLogging |
fuzzyCheckpointExecutor |
protected OReadCache |
readCache |
protected OSBTreeCollectionManagerShared |
sbTreeCollectionManager |
static int |
STORAGE_CONFIGURATION_INDEX_ID |
protected OWriteAheadLog |
writeAheadLog |
protected OWriteCache |
writeCache |
componentsFactory, configuration, mode, name, sharedContainer, stateLock, status, storageThreadGroup, url
CLUSTER_DEFAULT_NAME
Constructor and Description |
---|
OAbstractPaginatedStorage(String name,
String filePath,
String mode,
int id) |
Modifier and Type | Method and Description |
---|---|
void |
acquireReadLock(ORID rid) |
void |
acquireReadLock(ORID rid,
long timeout) |
void |
acquireWriteLock(ORID rid) |
void |
acquireWriteLock(ORID rid,
long timeout) |
int |
addCluster(String clusterName,
int requestedId)
Add a new cluster into the storage.
|
int |
addCluster(String clusterName,
Object... parameters)
Add a new cluster into the storage.
|
protected abstract void |
addFileToDirectory(String name,
InputStream stream,
File directory) |
int |
addIndexEngine(String engineName,
String algorithm,
String indexType,
OIndexDefinition indexDefinition,
OBinarySerializer valueSerializer,
boolean isAutomatic,
Boolean durableInNonTxMode,
int version,
int apiVersion,
boolean multivalue,
Map<String,String> engineProperties,
Set<String> clustersToIndex,
ODocument metadata) |
Iterator<OClusterBrowsePage> |
browseCluster(int clusterId) |
<T> T |
callIndexEngine(boolean readOperation,
int indexId,
OIndexEngineCallback<T> callback) |
OPhysicalPosition[] |
ceilingPhysicalPositions(int clusterId,
OPhysicalPosition physicalPosition) |
boolean |
check(boolean verbose,
OCommandOutputListener listener) |
boolean |
checkForRecordValidity(OPhysicalPosition ppos) |
protected OAbstractPaginatedStorage.StartupMetadata |
checkIfStorageDirty() |
protected void |
checkOpenness()
Checks if the storage is open.
|
void |
checkReadOnlyConditions() |
boolean |
cleanOutRecord(ORecordId recordId,
int recordVersion,
int iMode,
ORecordCallback<Boolean> callback) |
void |
clearIndex(int indexId) |
void |
clearProperties() |
protected void |
clearStorageDirty() |
void |
close(boolean force,
boolean onDelete) |
protected void |
closeClusters(boolean onDelete) |
protected void |
closeIndexes(OAtomicOperation atomicOperation,
boolean onDelete) |
Object |
command(OCommandRequestText iCommand)
Executes the command request and return the result back.
|
List<ORecordOperation> |
commit(OTransactionInternal clientTx)
Traditional commit that support already temporary rid and already assigned rids
|
protected List<ORecordOperation> |
commit(OTransactionInternal transaction,
boolean allocated)
The commit operation can be run in 3 different conditions, embedded commit, pre-allocated
commit, other node commit.
|
List<ORecordOperation> |
commitPreAllocated(OTransactionInternal clientTx)
Commit a transaction where the rid where pre-allocated in a previous phase
|
protected abstract OLogSequenceNumber |
copyWALToIncrementalBackup(ZipOutputStream zipOutputStream,
long startSegment) |
long |
count(int iClusterId) |
long |
count(int[] iClusterIds) |
long |
count(int[] iClusterIds,
boolean countTombstones) |
long |
count(int clusterId,
boolean countTombstones) |
void |
create(OContextConfiguration contextConfiguration) |
OStorageOperationResult<OPhysicalPosition> |
createRecord(ORecordId rid,
byte[] content,
int recordVersion,
byte recordType,
ORecordCallback<Long> callback) |
protected abstract OWriteAheadLog |
createWalFromIBUFiles(File directory,
OContextConfiguration contextConfiguration,
Locale locale,
byte[] iv) |
protected abstract File |
createWalTempDirectory() |
void |
delete() |
void |
deleteIndexEngine(int indexId) |
OStorageOperationResult<Boolean> |
deleteRecord(ORecordId rid,
int version,
int mode,
ORecordCallback<Boolean> callback) |
boolean |
dropCluster(int clusterId)
Drops a cluster.
|
Object |
executeCommand(OCommandRequestText iCommand,
OCommandExecutor executor) |
static int |
extractEngineAPIVersion(int externalId) |
Optional<OBackgroundNewDelta> |
extractTransactionsFromWal(List<OTransactionId> transactionsMetadata) |
void |
fireConfigurationUpdateNotifications() |
OPhysicalPosition[] |
floorPhysicalPositions(int clusterId,
OPhysicalPosition physicalPosition) |
void |
freeze(boolean throwException)
After this method finished it's execution, all threads that are going to perform data
modifications in storage should wait till
OFreezableStorageComponent.release() method will be called. |
void |
fullIncrementalBackup(OutputStream stream) |
OAtomicOperationsManager |
getAtomicOperationsManager() |
long[] |
getClusterDataRange(int iClusterId)
Returns a pair of long values telling the begin and end positions of data in the requested
cluster.
|
String |
getClusterEncryption(int clusterId) |
int |
getClusterIdByName(String clusterName) |
Set<OCluster> |
getClusterInstances() |
String |
getClusterName(int clusterId) |
String |
getClusterNameById(int clusterId) |
Set<String> |
getClusterNames() |
long |
getClusterNextPosition(int clusterId) |
String |
getClusterRecordConflictStrategy(int clusterId) |
long |
getClusterRecordsSizeById(int clusterId) |
long |
getClusterRecordsSizeByName(String clusterName) |
int |
getClusters() |
OStorageConfiguration |
getConfiguration() |
String |
getCreatedAtVersion() |
int |
getDefaultClusterId() |
long |
getFullCheckpointCount() |
int |
getId() |
AtomicOperationIdGen |
getIdGen() |
Stream<ORawPair<Object,ORID>> |
getIndexDescStream(int indexId,
OBaseIndexEngine.ValuesTransformer valuesTransformer) |
OBaseIndexEngine |
getIndexEngine(int indexId) |
Stream<Object> |
getIndexKeyStream(int indexId) |
long |
getIndexSize(int indexId,
OBaseIndexEngine.ValuesTransformer transformer) |
Stream<ORawPair<Object,ORID>> |
getIndexStream(int indexId,
OBaseIndexEngine.ValuesTransformer valuesTransformer) |
Object |
getIndexValue(int indexId,
Object key) |
Stream<ORID> |
getIndexValues(int indexId,
Object key) |
protected abstract byte[] |
getIv() |
long |
getLastCloseTime() |
long |
getLastClusterPosition(int clusterId) |
Optional<byte[]> |
getLastMetadata() |
OLogSequenceNumber |
getLSN() |
String |
getMode() |
String |
getPhysicalClusterNameById(int iClusterId) |
OReadCache |
getReadCache() |
ORecordConflictStrategy |
getRecordConflictStrategy() |
ORecordMetadata |
getRecordMetadata(ORID rid) |
long |
getRecordScanned() |
OPaginatedCluster.RECORD_STATUS |
getRecordStatus(ORID rid) |
OStorageRecoverListener |
getRecoverListener() |
protected static Map<Integer,List<ORecordId>> |
getRidsGroupedByCluster(Collection<ORecordId> rids) |
OSBTreeCollectionManager |
getSBtreeCollectionManager() |
int |
getSessionCount() |
long |
getSize()
Returns the size of the database.
|
OStorageTransaction |
getStorageTransaction() |
UUID |
getUuid() |
OWriteAheadLog |
getWALInstance() |
OWriteCache |
getWriteCache() |
void |
handleJVMError(Error e)
That is internal method which is called once we encounter any error inside of JVM.
|
boolean |
hasIndexRangeQuerySupport(int indexId) |
OPhysicalPosition[] |
higherPhysicalPositions(int currentClusterId,
OPhysicalPosition physicalPosition) |
void |
incOnOpen() |
String |
incrementalBackup(String backupDirectory,
OCallable<Void,Void> started) |
protected void |
initConfiguration(OAtomicOperation atomicOperation,
OContextConfiguration contextConfiguration) |
protected abstract void |
initIv() |
protected abstract void |
initWalAndDiskCache(OContextConfiguration contextConfiguration) |
boolean |
isClosed() |
boolean |
isDeleted(ORID rid) |
protected boolean |
isDirty() |
boolean |
isRemote() |
boolean |
isSystemCluster(int clusterId) |
protected abstract boolean |
isWriteAllowedDuringIncrementalBackup() |
Stream<ORawPair<Object,ORID>> |
iterateIndexEntriesBetween(int indexId,
Object rangeFrom,
boolean fromInclusive,
Object rangeTo,
boolean toInclusive,
boolean ascSortOrder,
OBaseIndexEngine.ValuesTransformer transformer) |
Stream<ORawPair<Object,ORID>> |
iterateIndexEntriesMajor(int indexId,
Object fromKey,
boolean isInclusive,
boolean ascSortOrder,
OBaseIndexEngine.ValuesTransformer transformer) |
Stream<ORawPair<Object,ORID>> |
iterateIndexEntriesMinor(int indexId,
Object toKey,
boolean isInclusive,
boolean ascSortOrder,
OBaseIndexEngine.ValuesTransformer transformer) |
int |
loadExternalIndexEngine(String engineName,
String algorithm,
String indexType,
OIndexDefinition indexDefinition,
OBinarySerializer valueSerializer,
boolean isAutomatic,
Boolean durableInNonTxMode,
int version,
int apiVersion,
boolean multivalue,
Map<String,String> engineProperties,
ODocument metadata) |
int |
loadIndexEngine(String name) |
protected Error |
logAndPrepareForRethrow(Error error) |
protected RuntimeException |
logAndPrepareForRethrow(RuntimeException runtimeException) |
protected RuntimeException |
logAndPrepareForRethrow(Throwable throwable) |
void |
lowDiskSpace(OLowDiskSpaceInformation information) |
OPhysicalPosition[] |
lowerPhysicalPositions(int currentClusterId,
OPhysicalPosition physicalPosition) |
protected void |
makeFullCheckpoint() |
protected void |
makeFuzzyCheckpoint() |
protected void |
makeStorageDirty() |
void |
onException(Throwable e) |
void |
open(OContextConfiguration contextConfiguration) |
void |
open(OToken iToken,
OContextConfiguration configuration) |
void |
open(String iUserName,
String iUserPassword,
OContextConfiguration contextConfiguration) |
protected void |
openClusters() |
protected void |
openIndexes() |
void |
pageIsBroken(String fileName,
long pageIndex)
Method is called by write cache when it is detected that data page in file is broken.
|
void |
pauseConfigurationUpdateNotifications() |
protected abstract void |
postCloseSteps(boolean onDelete,
boolean jvmError,
long lastTxId) |
protected void |
postCloseStepsAfterLock(Map<String,Object> params) |
protected void |
postCreateSteps() |
protected void |
postDeleteSteps() |
void |
preallocateRids(OTransactionInternal clientTx)
Scan the given transaction for new record and allocate a record id for them, the relative
record id is inserted inside the transaction for future use.
|
protected Map<String,Object> |
preCloseSteps() |
protected void |
preCreateSteps() |
void |
putIndexValue(int indexId,
Object key,
Object value) |
void |
putRidIndexEntry(int indexId,
Object key,
ORID value) |
protected abstract void |
readIv() |
OStorageOperationResult<ORawBuffer> |
readRecord(ORecordId iRid,
String iFetchPlan,
boolean iIgnoreCache,
boolean prefetchRecords,
ORecordCallback<ORawBuffer> iCallback) |
OStorageOperationResult<ORawBuffer> |
readRecordIfVersionIsNotLatest(ORecordId rid,
String fetchPlan,
boolean ignoreCache,
int recordVersion) |
void |
registerRecoverListener(OStorageRecoverListener recoverListener) |
void |
release()
After this method finished execution all threads that are waiting to perform data modifications
in storage will be awaken and will be allowed to continue their execution.
|
void |
releaseReadLock(ORID rid) |
void |
releaseWriteLock(ORID rid) |
void |
reload() |
boolean |
removeKeyFromIndex(int indexId,
Object key) |
void |
removeProperty(String property) |
boolean |
removeRidIndexEntry(int indexId,
Object key,
ORID value) |
void |
requestCheckpoint() |
protected void |
restoreAtomicUnit(List<OWALRecord> atomicUnit,
OModifiableBoolean atLeastOnePageUpdate) |
protected OLogSequenceNumber |
restoreFrom(OLogSequenceNumber lsn,
OWriteAheadLog writeAheadLog,
boolean wcRestoreMode) |
void |
restoreFromIncrementalBackup(String filePath) |
void |
restoreFullIncrementalBackup(InputStream stream) |
void |
rollback(OTransactionInternal clientTx) |
protected void |
serializeDeltaContent(OutputStream stream,
OCommandOutputListener outputListener,
SortedSet<ORID> sortedRids,
OLogSequenceNumber lsn) |
void |
setCharset(String charset) |
boolean |
setClusterAttribute(int id,
OCluster.ATTRIBUTES attribute,
Object value) |
boolean |
setClusterAttribute(String clusterName,
OCluster.ATTRIBUTES attribute,
Object value) |
void |
setClusterSelection(String clusterSelection) |
void |
setConflictStrategy(ORecordConflictStrategy conflictResolver) |
void |
setDateFormat(String dateFormat) |
void |
setDateTimeFormat(String dateTimeFormat) |
void |
setDefaultClusterId(int defaultClusterId) |
void |
setIndexMgrRecordId(String indexMgrRecordId) |
void |
setLocaleCountry(String localeCountry) |
void |
setLocaleLanguage(String locale) |
void |
setMinimumClusters(int minimumClusters) |
void |
setProperty(String property,
String value) |
void |
setRecordSerializer(String recordSerializer,
int version) |
void |
setSchemaRecordId(String schemaRecordId) |
void |
setStorageConfigurationUpdateListener(OStorageConfigurationUpdateListener storageConfigurationUpdateListener) |
void |
setTimeZone(TimeZone timeZoneValue) |
void |
setValidation(boolean validation) |
boolean |
supportIncremental() |
void |
synch() |
void |
tryToDeleteTreeRidBag(OSBTreeRidBag ridBag) |
void |
underDistributedStorage()
This method is called by distributed storage during initialization to indicate that database is
used in distributed cluster configuration
|
void |
unregisterRecoverListener(OStorageRecoverListener recoverListener) |
void |
updateIndexEntry(int indexId,
Object key,
OIndexKeyUpdater<Object> valueCreator) |
OStorageOperationResult<Integer> |
updateRecord(ORecordId rid,
boolean updateContent,
byte[] content,
int version,
byte recordType,
int mode,
ORecordCallback<Integer> callback) |
boolean |
validatedPutIndexValue(int indexId,
Object key,
ORID value,
OBaseIndexEngine.Validator<Object,ORID> validator)
Puts the given value under the given key into this storage for the index with the given index
id.
|
boolean |
wereDataRestoredAfterOpen() |
boolean |
wereNonTxOperationsPerformedInPreviousOpen() |
close, countRecords, dropCluster, existsResource, getComponentsFactory, getName, getResource, getStatus, getUnderlying, getURL, getVersion, isAssigningClusterIds, isDistributed, normalizeName, removeResource, shutdown, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, countRecords, dropCluster, exists, getComponentsFactory, getName, getStatus, getType, getUnderlying, getVersion, isAssigningClusterIds, isDistributed, shutdown
backup, restore
existsResource, getResource, removeResource
getURL
protected static final OScheduledThreadPoolExecutorWithLogging fuzzyCheckpointExecutor
public static final int STORAGE_CONFIGURATION_INDEX_ID
protected final OSBTreeCollectionManagerShared sbTreeCollectionManager
protected volatile OWriteAheadLog writeAheadLog
protected volatile OReadCache readCache
protected volatile OWriteCache writeCache
protected volatile OAtomicOperationsManager atomicOperationsManager
protected AtomicOperationsTable atomicOperationsTable
public final void open(String iUserName, String iUserPassword, OContextConfiguration contextConfiguration)
public final void open(OContextConfiguration contextConfiguration)
protected abstract void readIv() throws IOException
IOException
protected abstract byte[] getIv()
public final void handleJVMError(Error e)
public void underDistributedStorage()
public final String getCreatedAtVersion()
getCreatedAtVersion
in interface OStorage
protected final void openIndexes()
protected final void openClusters() throws IOException
IOException
public void open(OToken iToken, OContextConfiguration configuration)
public void create(OContextConfiguration contextConfiguration)
protected abstract void initIv() throws IOException
IOException
public final boolean isClosed()
isClosed
in interface OStorage
isClosed
in class OStorageAbstract
public final void close(boolean force, boolean onDelete)
close
in interface OStorage
close
in class OStorageAbstract
public boolean check(boolean verbose, OCommandOutputListener listener)
public final int addCluster(String clusterName, Object... parameters)
OStorage
addCluster
in interface OStorage
clusterName
- name of the clusterpublic final int addCluster(String clusterName, int requestedId)
OStorage
addCluster
in interface OStorage
clusterName
- name of the clusterrequestedId
- requested id of the clusterpublic final boolean dropCluster(int clusterId)
OStorage
dropCluster
in interface OStorage
clusterId
- id of the cluster to deletepublic String getClusterNameById(int clusterId)
getClusterNameById
in interface OStorage
public long getClusterRecordsSizeById(int clusterId)
getClusterRecordsSizeById
in interface OStorage
public long getClusterRecordsSizeByName(String clusterName)
getClusterRecordsSizeByName
in interface OStorage
public String getClusterRecordConflictStrategy(int clusterId)
getClusterRecordConflictStrategy
in interface OStorage
public String getClusterEncryption(int clusterId)
getClusterEncryption
in interface OStorage
public boolean isSystemCluster(int clusterId)
isSystemCluster
in interface OStorage
public long getLastClusterPosition(int clusterId)
getLastClusterPosition
in interface OStorage
public long getClusterNextPosition(int clusterId)
getClusterNextPosition
in interface OStorage
public OPaginatedCluster.RECORD_STATUS getRecordStatus(ORID rid)
getRecordStatus
in interface OStorage
public final int getId()
getId
in interface OIdentifiableStorage
public UUID getUuid()
public final OSBTreeCollectionManager getSBtreeCollectionManager()
getSBtreeCollectionManager
in interface OStorage
public OReadCache getReadCache()
public OWriteCache getWriteCache()
public final long count(int clusterId, boolean countTombstones)
public final long[] getClusterDataRange(int iClusterId)
OStorage
getClusterDataRange
in interface OStorage
iClusterId
- Cluster idpublic OLogSequenceNumber getLSN()
public final void onException(Throwable e)
onException
in interface OBackgroundExceptionListener
public Optional<OBackgroundNewDelta> extractTransactionsFromWal(List<OTransactionId> transactionsMetadata)
protected void serializeDeltaContent(OutputStream stream, OCommandOutputListener outputListener, SortedSet<ORID> sortedRids, OLogSequenceNumber lsn)
public final long count(int[] iClusterIds, boolean countTombstones)
public final OStorageOperationResult<OPhysicalPosition> createRecord(ORecordId rid, byte[] content, int recordVersion, byte recordType, ORecordCallback<Long> callback)
public final ORecordMetadata getRecordMetadata(ORID rid)
getRecordMetadata
in interface OStorage
public boolean isDeleted(ORID rid)
public Iterator<OClusterBrowsePage> browseCluster(int clusterId)
public OStorageOperationResult<ORawBuffer> readRecord(ORecordId iRid, String iFetchPlan, boolean iIgnoreCache, boolean prefetchRecords, ORecordCallback<ORawBuffer> iCallback)
readRecord
in interface OStorage
public final OStorageOperationResult<ORawBuffer> readRecordIfVersionIsNotLatest(ORecordId rid, String fetchPlan, boolean ignoreCache, int recordVersion) throws ORecordNotFoundException
readRecordIfVersionIsNotLatest
in interface OStorage
ORecordNotFoundException
public final OStorageOperationResult<Integer> updateRecord(ORecordId rid, boolean updateContent, byte[] content, int version, byte recordType, int mode, ORecordCallback<Integer> callback)
public OStorageTransaction getStorageTransaction()
public final OAtomicOperationsManager getAtomicOperationsManager()
public OWriteAheadLog getWALInstance()
public AtomicOperationIdGen getIdGen()
public final OStorageOperationResult<Boolean> deleteRecord(ORecordId rid, int version, int mode, ORecordCallback<Boolean> callback)
deleteRecord
in interface OStorage
public final Set<String> getClusterNames()
getClusterNames
in interface OStorage
getClusterNames
in interface OStorageInfo
public final int getClusterIdByName(String clusterName)
getClusterIdByName
in interface OStorage
public void preallocateRids(OTransactionInternal clientTx)
clientTx
- the transaction of witch allocate ridspublic List<ORecordOperation> commit(OTransactionInternal clientTx)
public List<ORecordOperation> commitPreAllocated(OTransactionInternal clientTx)
clientTx
- the pre-allocated transaction to commitprotected List<ORecordOperation> commit(OTransactionInternal transaction, boolean allocated)
transaction
- the transaction to commitallocated
- true if the operation is pre-allocated commitpublic int loadIndexEngine(String name)
public int loadExternalIndexEngine(String engineName, String algorithm, String indexType, OIndexDefinition indexDefinition, OBinarySerializer valueSerializer, boolean isAutomatic, Boolean durableInNonTxMode, int version, int apiVersion, boolean multivalue, Map<String,String> engineProperties, ODocument metadata)
public int addIndexEngine(String engineName, String algorithm, String indexType, OIndexDefinition indexDefinition, OBinarySerializer valueSerializer, boolean isAutomatic, Boolean durableInNonTxMode, int version, int apiVersion, boolean multivalue, Map<String,String> engineProperties, Set<String> clustersToIndex, ODocument metadata)
public static int extractEngineAPIVersion(int externalId)
public void deleteIndexEngine(int indexId) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public boolean removeKeyFromIndex(int indexId, Object key) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public void clearIndex(int indexId) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public Object getIndexValue(int indexId, Object key) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public Stream<ORID> getIndexValues(int indexId, Object key) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public OBaseIndexEngine getIndexEngine(int indexId) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public void updateIndexEntry(int indexId, Object key, OIndexKeyUpdater<Object> valueCreator) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public <T> T callIndexEngine(boolean readOperation, int indexId, OIndexEngineCallback<T> callback) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public void putRidIndexEntry(int indexId, Object key, ORID value) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public boolean removeRidIndexEntry(int indexId, Object key, ORID value) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public void putIndexValue(int indexId, Object key, Object value) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public boolean validatedPutIndexValue(int indexId, Object key, ORID value, OBaseIndexEngine.Validator<Object,ORID> validator) throws OInvalidIndexEngineIdException
indexId
- the index id of the index to put the value into.key
- the key to put the value under.value
- the value to put.validator
- the operation validator.true
if the validator allowed the put, false
otherwise.OInvalidIndexEngineIdException
OBaseIndexEngine.Validator#validate(Object, Object, Object)
public Stream<ORawPair<Object,ORID>> iterateIndexEntriesBetween(int indexId, Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, OBaseIndexEngine.ValuesTransformer transformer) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public Stream<ORawPair<Object,ORID>> iterateIndexEntriesMajor(int indexId, Object fromKey, boolean isInclusive, boolean ascSortOrder, OBaseIndexEngine.ValuesTransformer transformer) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public Stream<ORawPair<Object,ORID>> iterateIndexEntriesMinor(int indexId, Object toKey, boolean isInclusive, boolean ascSortOrder, OBaseIndexEngine.ValuesTransformer transformer) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public Stream<ORawPair<Object,ORID>> getIndexStream(int indexId, OBaseIndexEngine.ValuesTransformer valuesTransformer) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public Stream<ORawPair<Object,ORID>> getIndexDescStream(int indexId, OBaseIndexEngine.ValuesTransformer valuesTransformer) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public Stream<Object> getIndexKeyStream(int indexId) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public long getIndexSize(int indexId, OBaseIndexEngine.ValuesTransformer transformer) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public boolean hasIndexRangeQuerySupport(int indexId) throws OInvalidIndexEngineIdException
OInvalidIndexEngineIdException
public void rollback(OTransactionInternal clientTx)
public final boolean checkForRecordValidity(OPhysicalPosition ppos)
checkForRecordValidity
in interface OStorage
checkForRecordValidity
in class OStorageAbstract
public final String getPhysicalClusterNameById(int iClusterId)
getPhysicalClusterNameById
in interface OStorage
public final int getDefaultClusterId()
getDefaultClusterId
in interface OStorageInfo
public final void setDefaultClusterId(int defaultClusterId)
setDefaultClusterId
in interface OStorage
public String getClusterName(int clusterId)
getClusterName
in interface OStorage
public final long getSize()
OStorage
public final int getClusters()
getClusters
in interface OStorageInfo
public final Set<OCluster> getClusterInstances()
getClusterInstances
in interface OStorage
public final boolean cleanOutRecord(ORecordId recordId, int recordVersion, int iMode, ORecordCallback<Boolean> callback)
cleanOutRecord
in interface OStorage
public final void freeze(boolean throwException)
OFreezableStorageComponent
OFreezableStorageComponent.release()
method will be called. This method
will wait till all ongoing modifications will be finished.freeze
in interface OFreezableStorageComponent
throwException
- If true
OModificationOperationProhibitedException
exception will be thrown on call of methods that requires storage modification. Otherwise
other threads will wait for OFreezableStorageComponent.release()
method call.public final void release()
OFreezableStorageComponent
release
in interface OFreezableStorageComponent
public boolean wereDataRestoredAfterOpen()
public boolean wereNonTxOperationsPerformedInPreviousOpen()
public String getMode()
public final void lowDiskSpace(OLowDiskSpaceInformation information)
lowDiskSpace
in interface OLowDiskSpaceListener
public final void pageIsBroken(String fileName, long pageIndex)
OPageIsBrokenListener
pageIsBroken
in interface OPageIsBrokenListener
fileName
- Name of broken file.pageIndex
- Index of page which is broken in file.public final void requestCheckpoint()
requestCheckpoint
in interface OCheckpointRequestListener
public final Object command(OCommandRequestText iCommand)
public final Object executeCommand(OCommandRequestText iCommand, OCommandExecutor executor)
public final OPhysicalPosition[] higherPhysicalPositions(int currentClusterId, OPhysicalPosition physicalPosition)
higherPhysicalPositions
in interface OStorage
public final OPhysicalPosition[] ceilingPhysicalPositions(int clusterId, OPhysicalPosition physicalPosition)
ceilingPhysicalPositions
in interface OStorage
public final OPhysicalPosition[] lowerPhysicalPositions(int currentClusterId, OPhysicalPosition physicalPosition)
lowerPhysicalPositions
in interface OStorage
public final OPhysicalPosition[] floorPhysicalPositions(int clusterId, OPhysicalPosition physicalPosition)
floorPhysicalPositions
in interface OStorage
public void acquireWriteLock(ORID rid, long timeout)
public final void acquireWriteLock(ORID rid)
public final void releaseWriteLock(ORID rid)
public final void acquireReadLock(ORID rid)
public void acquireReadLock(ORID rid, long timeout)
public final void releaseReadLock(ORID rid)
public final ORecordConflictStrategy getRecordConflictStrategy()
getRecordConflictStrategy
in interface OStorage
public final void setConflictStrategy(ORecordConflictStrategy conflictResolver)
setConflictStrategy
in interface OStorage
public long getRecordScanned()
protected abstract OLogSequenceNumber copyWALToIncrementalBackup(ZipOutputStream zipOutputStream, long startSegment) throws IOException
IOException
protected abstract boolean isWriteAllowedDuringIncrementalBackup()
public OStorageRecoverListener getRecoverListener()
public void registerRecoverListener(OStorageRecoverListener recoverListener)
public void unregisterRecoverListener(OStorageRecoverListener recoverListener)
protected abstract File createWalTempDirectory()
protected abstract void addFileToDirectory(String name, InputStream stream, File directory) throws IOException
IOException
protected abstract OWriteAheadLog createWalFromIBUFiles(File directory, OContextConfiguration contextConfiguration, Locale locale, byte[] iv) throws IOException
IOException
protected final void checkOpenness()
protected final void makeFuzzyCheckpoint()
public void tryToDeleteTreeRidBag(OSBTreeRidBag ridBag)
protected void makeFullCheckpoint()
public long getFullCheckpointCount()
protected OAbstractPaginatedStorage.StartupMetadata checkIfStorageDirty() throws IOException
IOException
protected void initConfiguration(OAtomicOperation atomicOperation, OContextConfiguration contextConfiguration) throws IOException
IOException
protected final void postCreateSteps()
protected void preCreateSteps() throws IOException
IOException
protected abstract void initWalAndDiskCache(OContextConfiguration contextConfiguration) throws IOException, InterruptedException
IOException
InterruptedException
protected abstract void postCloseSteps(boolean onDelete, boolean jvmError, long lastTxId) throws IOException
IOException
protected void postDeleteSteps()
protected void makeStorageDirty() throws IOException
IOException
protected void clearStorageDirty() throws IOException
IOException
protected boolean isDirty()
public boolean setClusterAttribute(int id, OCluster.ATTRIBUTES attribute, Object value)
setClusterAttribute
in interface OStorage
public boolean setClusterAttribute(String clusterName, OCluster.ATTRIBUTES attribute, Object value)
setClusterAttribute
in interface OStorage
protected void closeClusters(boolean onDelete) throws IOException
IOException
protected void closeIndexes(OAtomicOperation atomicOperation, boolean onDelete)
public String incrementalBackup(String backupDirectory, OCallable<Void,Void> started) throws UnsupportedOperationException
incrementalBackup
in interface OStorage
UnsupportedOperationException
public boolean supportIncremental()
supportIncremental
in interface OStorage
public void fullIncrementalBackup(OutputStream stream) throws UnsupportedOperationException
fullIncrementalBackup
in interface OStorage
UnsupportedOperationException
public void restoreFromIncrementalBackup(String filePath)
restoreFromIncrementalBackup
in interface OStorage
public void restoreFullIncrementalBackup(InputStream stream) throws UnsupportedOperationException
restoreFullIncrementalBackup
in interface OStorage
UnsupportedOperationException
protected final OLogSequenceNumber restoreFrom(OLogSequenceNumber lsn, OWriteAheadLog writeAheadLog, boolean wcRestoreMode) throws IOException
IOException
protected final void restoreAtomicUnit(List<OWALRecord> atomicUnit, OModifiableBoolean atLeastOnePageUpdate) throws IOException
IOException
public final void checkReadOnlyConditions()
public void setStorageConfigurationUpdateListener(OStorageConfigurationUpdateListener storageConfigurationUpdateListener)
public void pauseConfigurationUpdateNotifications()
public void fireConfigurationUpdateNotifications()
protected static Map<Integer,List<ORecordId>> getRidsGroupedByCluster(Collection<ORecordId> rids)
protected final RuntimeException logAndPrepareForRethrow(RuntimeException runtimeException)
protected final RuntimeException logAndPrepareForRethrow(Throwable throwable)
public final OStorageConfiguration getConfiguration()
getConfiguration
in interface OStorageInfo
getConfiguration
in class OStorageAbstract
public final void setSchemaRecordId(String schemaRecordId)
setSchemaRecordId
in interface OStorage
public final void setDateFormat(String dateFormat)
setDateFormat
in interface OStorage
public final void setTimeZone(TimeZone timeZoneValue)
setTimeZone
in interface OStorage
public final void setLocaleLanguage(String locale)
setLocaleLanguage
in interface OStorage
public final void setCharset(String charset)
setCharset
in interface OStorage
public final void setIndexMgrRecordId(String indexMgrRecordId)
setIndexMgrRecordId
in interface OStorage
public final void setDateTimeFormat(String dateTimeFormat)
setDateTimeFormat
in interface OStorage
public final void setLocaleCountry(String localeCountry)
setLocaleCountry
in interface OStorage
public final void setClusterSelection(String clusterSelection)
setClusterSelection
in interface OStorage
public final void setMinimumClusters(int minimumClusters)
setMinimumClusters
in interface OStorage
public final void setValidation(boolean validation)
setValidation
in interface OStorage
public final void removeProperty(String property)
removeProperty
in interface OStorage
public final void setProperty(String property, String value)
setProperty
in interface OStorage
public final void setRecordSerializer(String recordSerializer, int version)
setRecordSerializer
in interface OStorage
public final void clearProperties()
clearProperties
in interface OStorage
public Optional<byte[]> getLastMetadata()
public void incOnOpen()
public int getSessionCount()
public long getLastCloseTime()
Copyright © 2009–2020 OrientDB. All rights reserved.