Class OAbstractPaginatedStorage
java.lang.Object
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage
- All Implemented Interfaces:
OBackgroundExceptionListener,OCheckpointRequestListener,OFreezableStorageComponent,OPageIsBrokenListener,OIdentifiableStorage,OStorage,OStorageInfo
- Direct Known Subclasses:
ODirectMemoryStorage,OLocalPaginatedStorage
public abstract class OAbstractPaginatedStorage
extends Object
implements OCheckpointRequestListener, OIdentifiableStorage, OBackgroundExceptionListener, OFreezableStorageComponent, OPageIsBrokenListener, OStorage
- Since:
- 28.03.13
- Author:
- Andrey Lomakin (a.lomakin-at-orientdb.com)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.storage.OStorage
OStorage.LOCKING_STRATEGY, OStorage.STATUS -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected OAtomicOperationsManagerprotected AtomicOperationsTableprotected OCurrentStorageComponentsFactoryprotected OStorageConfigurationprotected OrientDBInternalprotected static final Stringprotected static final Stringprotected AtomicReference<Throwable> protected static final ScheduledExecutorServiceprotected static final Stringprotected static final Stringprotected final OByteBufferPoolprotected Stringprotected OReadCacheprotected OSBTreeCollectionManagerSharedprotected final ReadWriteLockprotected OStorage.STATUSstatic final ThreadGroupprotected static final Stringprotected final Stringprotected OWriteAheadLogprotected OWriteCacheFields inherited from interface com.orientechnologies.orient.core.storage.OStorage
CLUSTER_DEFAULT_NAME -
Constructor Summary
ConstructorsConstructorDescriptionOAbstractPaginatedStorage(String name, String filePath, int id, OrientDBInternal context, OByteBufferPool pool) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidacquireReadLock(ORID rid) voidacquireReadLock(ORID rid, long timeout) final voidacquireWriteLock(ORID rid) voidacquireWriteLock(ORID rid, long timeout) final intaddCluster(String clusterName) Add a new cluster into the storage.final intaddCluster(String clusterName, int requestedId) Add a new cluster into the storage.protected abstract voidaddFileToDirectory(String name, InputStream stream, File directory) intaddIndexEngine(OIndexMetadata indexMetadata, Map<String, String> engineProperties) voidbackupTransactions(OutputStream outputStream, List<OTransactionId> transactionsMetadata) browseCluster(int clusterId) <T> TcallIndexEngine(boolean readOperation, int indexId, OIndexEngineCallback<T> callback) final OPhysicalPosition[]ceilingPhysicalPositions(int clusterId, OPhysicalPosition physicalPosition) booleancheck(boolean verbose, OCommandOutputListener listener) protected abstract PathcheckAndCleanPath(String path) protected voidprotected voidcheckDatabaseInstanceId(UUID backupUUID) voidfinal booleanprotected OStartupMetadatastatic Stringprotected final voidChecks if the storage is open.final booleancleanOutRecord(ORecordId recordId, int recordVersion) voidclearIndex(int indexId) final voidprotected voidvoidclose()protected voidcloseClusters(boolean onDelete) protected voidcloseIndexes(OAtomicOperation atomicOperation, boolean onDelete) voidcommit(OStorageTransaction clientTx) Traditional commit that support already temporary rid and already assigned ridsprotected voidcommit(OStorageTransaction transaction, boolean allocated) The commit operation can be run in 3 different conditions, embedded commit, pre-allocated commit, other node commit.voidcommitPreAllocated(OStorageTransaction clientTx) Commit a transaction where the rid where pre-allocated in a previous phaseprotected abstract OLogSequenceNumbercopyWALToIncrementalBackup(ZipOutputStream zipOutputStream, long startSegment) final longcount(int clusterId) final longcount(int[] iClusterIds) longReturns the total number of records.voidcreate(OContextConfiguration contextConfiguration, ODatabaseId id) createRecord(ORecordId rid, byte[] content, int recordVersion, byte recordType) createSBTree(int clusterId, UUID ownerUUID) protected abstract OWriteAheadLogcreateWalFromIBUFiles(File directory, OContextConfiguration contextConfiguration, Locale locale, byte[] iv) protected abstract Filefinal voiddelete()voiddeleteIndexEngine(int indexId) final OStorageOperationResult<Boolean> deleteRecord(ORecordId rid, int version) voiddeleteTreeRidBag(OSBTreeRidBag ridBag) protected voiddoCreate(OContextConfiguration contextConfiguration, ODatabaseId id) protected abstract voiddoDelete()protected static voiddoEncryptionDecryption(int mode, byte[] aesKey, long pageIndex, long fileId, byte[] backUpPage, byte[] encryptionIv) protected voidprotected voidfinal booleandropCluster(int clusterId) Drops a cluster.booleandropCluster(String iClusterName) protected voidvoidendDDL()static intextractEngineAPIVersion(int externalId) extractTransactionsFromWal(List<OTransactionId> transactionsMetadata) voidfinal OPhysicalPosition[]floorPhysicalPositions(int clusterId, OPhysicalPosition physicalPosition) protected voidfinal voidfreeze(boolean throwException) After this method finished it's execution, all threads that are going to perform data modifications in storage should wait tillOFreezableStorageComponent.release()method will be called.voidfullIncrementalBackup(OutputStream stream) protected voidgenerateDatabaseInstanceId(OAtomicOperation atomicOperation) final OAtomicOperationsManagerfinal long[]getClusterDataRange(int iClusterId) Returns a pair of long values telling the begin and end positions of data in the requested cluster.getClusterEncryption(int clusterId) final intgetClusterIdByName(String clusterName) getClusterName(int clusterId) getClusterNameById(int clusterId) longgetClusterNextPosition(int clusterId) getClusterRecordConflictStrategy(int clusterId) longgetClusterRecordsSizeById(int clusterId) longgetClusterRecordsSizeByName(String clusterName) final intint[]getClustersIds(Set<String> filterClusters) final OStorageConfigurationfinal Stringfinal intfinal intgetId()getIdGen()intgetIndexApiVersion(int indexId) getIndexDescStream(int indexId, IndexEngineValuesTransformer valuesTransformer) getIndexEngine(int indexId) getIndexKeyStream(int indexId) longgetIndexSize(int indexId, IndexEngineValuesTransformer transformer) getIndexStream(int indexId, IndexEngineValuesTransformer valuesTransformer) getIndexValues(int indexId, Object key) protected abstract byte[]getIv()longgetLastClusterPosition(int clusterId) Optional<byte[]> getLSN()getName()protected Stringfinal StringgetPhysicalClusterNameById(int iClusterId) final ORecordConflictStrategyfinal ORecordMetadatagetRecordMetadata(ORID rid) longgetRecordStatus(ORID rid) final OSBTreeCollectionManagerfinal longgetSize()Returns the size of the database.Returns the current storage's statusgetURL()longintgetVersionForKey(String indexName, Object key) booleanhasIndexRangeQuerySupport(int indexId) final OPhysicalPosition[]higherPhysicalPositions(int currentClusterId, OPhysicalPosition physicalPosition) protected OLogSequenceNumberincrementalBackup(OutputStream stream, OLogSequenceNumber fromLsn, boolean singleThread) protected OLogSequenceNumberincrementalBackup(OutputStream stream, OLogSequenceNumber fromLsn, boolean singleThread, boolean writeMetadata) incrementalBackup(String backupDirectory, OCallable<Void, Void> started) voidincrementalSync(OutputStream dest, Runnable started) protected voidinitConfiguration(OAtomicOperation atomicOperation, OContextConfiguration contextConfiguration) protected abstract voidinitIv()protected abstract voidinitWalAndDiskCache(OContextConfiguration contextConfiguration) booleanfinal booleanisClosed()protected final booleanprotected booleanbooleanprotected booleanisDirty()booleanprotected booleanbooleanisMemory()booleanisSystemCluster(int clusterId) protected abstract booleaniterateIndexEntriesBetween(int indexId, Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) iterateIndexEntriesMajor(int indexId, Object fromKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) iterateIndexEntriesMinor(int indexId, Object toKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) static OEncryptionloadEncryption(String cfgEncryption, String cfgEncryptionKey) intloadIndexEngine(OIndexMetadata indexMetadata) protected final ErrorlogAndPrepareForRethrow(Error error) protected ErrorlogAndPrepareForRethrow(Error error, boolean putInReadOnlyMode) protected RuntimeExceptionlogAndPrepareForRethrow(RuntimeException runtimeException) protected final RuntimeExceptionlogAndPrepareForRethrow(Throwable throwable) protected RuntimeExceptionlogAndPrepareForRethrow(Throwable throwable, boolean putInReadOnlyMode) final OPhysicalPosition[]lowerPhysicalPositions(int currentClusterId, OPhysicalPosition physicalPosition) final voidprotected voidvoidmetadataOnly(byte[] metadata) voidprotected static StringnormalizeName(String name) final voidfinal voidopen(OContextConfiguration contextConfiguration) protected final voidopenClusters(OAtomicOperation atomicOperation) protected final voidfinal voidpageIsBroken(String fileName, long pageIndex) Method is called by write cache when it is detected that data page in file is broken.voidprotected abstract voidpostCloseSteps(boolean onDelete, boolean internalError, long lastTxId) protected final voidprotected voidprotected voidpostProcessIncrementalRestore(OContextConfiguration contextConfiguration) voidpreallocateRids(OAllocationTransaction 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 voidprotected OQuarto<Locale, OContextConfiguration, String, Locale> protected UUIDprotected abstract voidreadIv()readRecord(ORecordId rid) final ORawBufferreadRecordIfVersionIsNotLatest(ORecordId rid, int recordVersion) readTransactionsFromWal(List<OTransactionId> transactionsMetadata) voidregisterRecoverListener(OStorageRecoverListener recoverListener) final voidrelease()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.final voidreleaseReadLock(ORID rid) final voidreleaseWriteLock(ORID rid) final voidreload()voidfinal voidremoveProperty(String property) final voidresolveObjectSerializer(byte serializerId) protected final booleanrestoreAtomicUnit(List<OWALRecord> atomicUnit, OModifiableBoolean atLeastOnePageUpdate) protected OLogSequenceNumberrestoreFrom(OWriteAheadLog writeAheadLog, OLogSequenceNumber lsn) voidrestoreFromIncrementalBackup(String filePath) protected voidrestoreFromIncrementalBackup(String charset, Locale serverLocale, Locale locale, OContextConfiguration contextConfiguration, byte[] aesKey, InputStream inputStream, boolean isFull) voidfinal voidsetCharset(String charset) booleansetClusterAttribute(int id, OCluster.ATTRIBUTES attribute, Object value) final voidsetClusterSelection(String clusterSelection) final voidsetConflictStrategy(ORecordConflictStrategy conflictResolver) final voidsetDateFormat(String dateFormat) final voidsetDateTimeFormat(String dateTimeFormat) final voidsetDefaultClusterId(int defaultClusterId) final voidsetIndexMgrRecordId(String indexMgrRecordId) final voidsetLocaleCountry(String localeCountry) final voidsetLocaleLanguage(String locale) final voidsetMinimumClusters(int minimumClusters) final voidsetProperty(String property, String value) final voidsetRecordSerializer(String recordSerializer, int version) final voidsetSchemaRecordId(String schemaRecordId) voidsetStorageConfigurationUpdateListener(OStorageConfigurationUpdateListener storageConfigurationUpdateListener) final voidsetTimeZone(TimeZone timeZoneValue) final voidsetValidation(boolean validation) voidshutdown()This method is called inOrient.shutdown()method.protected voidvoidstartDDL()booleanfinal voidsynch()toString()voidunregisterRecoverListener(OStorageRecoverListener recoverListener) final OStorageOperationResult<Integer> updateRecord(ORecordId rid, boolean updateContent, byte[] content, int version, byte recordType) booleanboolean
-
Field Details
-
ALGORITHM_NAME
- See Also:
-
TRANSFORMATION
- See Also:
-
ENCRYPTION_IV
- See Also:
-
IV_EXT
- See Also:
-
IV_NAME
- See Also:
-
storageThreadGroup
-
fuzzyCheckpointExecutor
-
sbTreeCollectionManager
-
writeAheadLog
-
readCache
-
writeCache
-
atomicOperationsManager
-
DATABASE_INSTANCE_ID
- See Also:
-
atomicOperationsTable
-
url
-
stateLock
-
configuration
-
componentsFactory
-
name
-
status
-
memoryPool
-
error
-
context
-
-
Constructor Details
-
OAbstractPaginatedStorage
public OAbstractPaginatedStorage(String name, String filePath, int id, OrientDBInternal context, OByteBufferPool pool)
-
-
Method Details
-
normalizeName
-
checkName
-
getName
- Specified by:
getNamein interfaceOStorage- Specified by:
getNamein interfaceOStorageInfo
-
getURL
- Specified by:
getURLin interfaceOStorageInfo
-
close
public void close() -
dropCluster
- Specified by:
dropClusterin interfaceOStorage
-
countRecords
public long countRecords()Description copied from interface:OStorageReturns the total number of records.- Specified by:
countRecordsin interfaceOStorage
-
toString
-
getStatus
Description copied from interface:OStorageReturns the current storage's status -
isAssigningClusterIds
public boolean isAssigningClusterIds()- Specified by:
isAssigningClusterIdsin interfaceOStorage- Specified by:
isAssigningClusterIdsin interfaceOStorageInfo
-
getComponentsFactory
- Specified by:
getComponentsFactoryin interfaceOStorage
-
getVersion
public long getVersion()- Specified by:
getVersionin interfaceOStorage
-
shutdown
public void shutdown()Description copied from interface:OStorageThis method is called inOrient.shutdown()method. For most of the storages it means that storage will be merely closed, but sometimes additional operations are need to be taken in account. -
open
-
readIv
- Throws:
IOException
-
getIv
protected abstract byte[] getIv() -
getCreatedAtVersion
- Specified by:
getCreatedAtVersionin interfaceOStorage- Returns:
- Version of product release under which storage was created.
-
openIndexes
protected final void openIndexes() -
openClusters
- Throws:
IOException
-
create
-
doCreate
protected void doCreate(OContextConfiguration contextConfiguration, ODatabaseId id) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
generateDatabaseInstanceId
-
readDatabaseInstanceId
-
checkDatabaseInstanceId
-
initIv
- Throws:
IOException
-
isClosed
public final boolean isClosed() -
isClosedInternal
protected final boolean isClosedInternal() -
delete
public final void delete() -
doDelete
- Throws:
IOException
-
check
-
addCluster
Description copied from interface:OStorageAdd a new cluster into the storage.- Specified by:
addClusterin interfaceOStorage- Parameters:
clusterName- name of the cluster
-
addCluster
Description copied from interface:OStorageAdd a new cluster into the storage.- Specified by:
addClusterin interfaceOStorage- Parameters:
clusterName- name of the clusterrequestedId- requested id of the cluster
-
dropCluster
public final boolean dropCluster(int clusterId) Description copied from interface:OStorageDrops a cluster.- Specified by:
dropClusterin interfaceOStorage- Parameters:
clusterId- id of the cluster to delete- Returns:
- true if has been removed, otherwise false
-
getClusterNameById
- Specified by:
getClusterNameByIdin interfaceOStorage
-
getClusterRecordsSizeById
public long getClusterRecordsSizeById(int clusterId) - Specified by:
getClusterRecordsSizeByIdin interfaceOStorage
-
getClusterRecordsSizeByName
- Specified by:
getClusterRecordsSizeByNamein interfaceOStorage
-
getClusterRecordConflictStrategy
- Specified by:
getClusterRecordConflictStrategyin interfaceOStorage
-
getClusterEncryption
- Specified by:
getClusterEncryptionin interfaceOStorage
-
isSystemCluster
public boolean isSystemCluster(int clusterId) - Specified by:
isSystemClusterin interfaceOStorage
-
getLastClusterPosition
public long getLastClusterPosition(int clusterId) - Specified by:
getLastClusterPositionin interfaceOStorage
-
getClusterNextPosition
public long getClusterNextPosition(int clusterId) - Specified by:
getClusterNextPositionin interfaceOStorage
-
getRecordStatus
- Specified by:
getRecordStatusin interfaceOStorage
-
getId
public final int getId()- Specified by:
getIdin interfaceOIdentifiableStorage
-
getDatbaseId
- Specified by:
getDatbaseIdin interfaceOStorage
-
getSBtreeCollectionManager
- Specified by:
getSBtreeCollectionManagerin interfaceOStorage
-
getReadCache
-
getWriteCache
-
count
public final long count(int clusterId) -
getClusterDataRange
public final long[] getClusterDataRange(int iClusterId) Description copied from interface:OStorageReturns a pair of long values telling the begin and end positions of data in the requested cluster. Useful to know the range of the records.- Specified by:
getClusterDataRangein interfaceOStorage- Parameters:
iClusterId- Cluster id
-
getLSN
-
onException
- Specified by:
onExceptionin interfaceOBackgroundExceptionListener
-
readTransactionsFromWal
public Optional<List<OTransactionData>> readTransactionsFromWal(List<OTransactionId> transactionsMetadata) -
backupTransactions
public void backupTransactions(OutputStream outputStream, List<OTransactionId> transactionsMetadata) - Specified by:
backupTransactionsin interfaceOStorage
-
extractTransactionsFromWal
public Optional<OBackgroundNewDelta> extractTransactionsFromWal(List<OTransactionId> transactionsMetadata) - Specified by:
extractTransactionsFromWalin interfaceOStorage
-
count
public final long count(int[] iClusterIds) -
createRecord
public final OStorageOperationResult<OPhysicalPosition> createRecord(ORecordId rid, byte[] content, int recordVersion, byte recordType) -
getRecordMetadata
- Specified by:
getRecordMetadatain interfaceOStorage
-
isDeleted
-
browseCluster
-
readRecord
- Specified by:
readRecordin interfaceOStorage
-
readRecordIfVersionIsNotLatest
public final ORawBuffer readRecordIfVersionIsNotLatest(ORecordId rid, int recordVersion) throws ORecordNotFoundException - Specified by:
readRecordIfVersionIsNotLatestin interfaceOStorage- Throws:
ORecordNotFoundException
-
updateRecord
public final OStorageOperationResult<Integer> updateRecord(ORecordId rid, boolean updateContent, byte[] content, int version, byte recordType) -
getAtomicOperationsManager
-
getWALInstance
-
getIdGen
-
deleteRecord
- Specified by:
deleteRecordin interfaceOStorage
-
getClusterNames
- Specified by:
getClusterNamesin interfaceOStorage- Specified by:
getClusterNamesin interfaceOStorageInfo
-
getClusterIdByName
- Specified by:
getClusterIdByNamein interfaceOStorage- Specified by:
getClusterIdByNamein interfaceOStorageInfo
-
preallocateRids
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.- Specified by:
preallocateRidsin interfaceOStorage- Parameters:
clientTx- the transaction of witch allocate rids
-
commit
Traditional commit that support already temporary rid and already assigned rids -
commitPreAllocated
Commit a transaction where the rid where pre-allocated in a previous phase- Specified by:
commitPreAllocatedin interfaceOStorage- Parameters:
clientTx- the pre-allocated transaction to commit
-
commit
The commit operation can be run in 3 different conditions, embedded commit, pre-allocated commit, other node commit.Embedded commit is the basic commit where the operation is run in embedded or server side, the transaction arrive with invalid rids that get allocated and committed.pre-allocated commit is the commit that happen after an preAllocateRids call is done, this is usually run by the coordinator of a tx in distributed.other node commit is the commit that happen when a node execute a transaction of another node where all the rids are already allocated in the other node.- Parameters:
transaction- the transaction to commitallocated- true if the operation is pre-allocated commit
-
loadIndexEngine
- Specified by:
loadIndexEnginein interfaceOStorage
-
addIndexEngine
- Specified by:
addIndexEnginein interfaceOStorage
-
resolveObjectSerializer
- Specified by:
resolveObjectSerializerin interfaceOStorage
-
loadEncryption
-
extractEngineAPIVersion
public static int extractEngineAPIVersion(int externalId) -
deleteIndexEngine
- Specified by:
deleteIndexEnginein interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
clearIndex
- Specified by:
clearIndexin interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
getIndexValues
- Specified by:
getIndexValuesin interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
getIndexEngine
- Specified by:
getIndexEnginein interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
callIndexEngine
public <T> T callIndexEngine(boolean readOperation, int indexId, OIndexEngineCallback<T> callback) throws OInvalidIndexEngineIdException - Specified by:
callIndexEnginein interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
iterateIndexEntriesBetween
public Stream<ORawPair<Object,ORID>> iterateIndexEntriesBetween(int indexId, Object rangeFrom, boolean fromInclusive, Object rangeTo, boolean toInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) throws OInvalidIndexEngineIdException - Specified by:
iterateIndexEntriesBetweenin interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
iterateIndexEntriesMajor
public Stream<ORawPair<Object,ORID>> iterateIndexEntriesMajor(int indexId, Object fromKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) throws OInvalidIndexEngineIdException - Specified by:
iterateIndexEntriesMajorin interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
iterateIndexEntriesMinor
public Stream<ORawPair<Object,ORID>> iterateIndexEntriesMinor(int indexId, Object toKey, boolean isInclusive, boolean ascSortOrder, IndexEngineValuesTransformer transformer) throws OInvalidIndexEngineIdException - Specified by:
iterateIndexEntriesMinorin interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
getIndexStream
public Stream<ORawPair<Object,ORID>> getIndexStream(int indexId, IndexEngineValuesTransformer valuesTransformer) throws OInvalidIndexEngineIdException - Specified by:
getIndexStreamin interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
getIndexDescStream
public Stream<ORawPair<Object,ORID>> getIndexDescStream(int indexId, IndexEngineValuesTransformer valuesTransformer) throws OInvalidIndexEngineIdException - Specified by:
getIndexDescStreamin interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
getIndexKeyStream
- Specified by:
getIndexKeyStreamin interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
getIndexSize
public long getIndexSize(int indexId, IndexEngineValuesTransformer transformer) throws OInvalidIndexEngineIdException - Specified by:
getIndexSizein interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
hasIndexRangeQuerySupport
- Specified by:
hasIndexRangeQuerySupportin interfaceOStorage- Throws:
OInvalidIndexEngineIdException
-
moveToErrorStateIfNeeded
-
checkForRecordValidity
-
synch
public final void synch() -
getPhysicalClusterNameById
- Specified by:
getPhysicalClusterNameByIdin interfaceOStorage- Specified by:
getPhysicalClusterNameByIdin interfaceOStorageInfo
-
getDefaultClusterId
public final int getDefaultClusterId()- Specified by:
getDefaultClusterIdin interfaceOStorageInfo
-
setDefaultClusterId
public final void setDefaultClusterId(int defaultClusterId) - Specified by:
setDefaultClusterIdin interfaceOStorage
-
getClusterName
- Specified by:
getClusterNamein interfaceOStorage
-
getSize
public final long getSize()Description copied from interface:OStorageReturns the size of the database. -
getClusters
public final int getClusters()- Specified by:
getClustersin interfaceOStorageInfo
-
getClusterInstances
- Specified by:
getClusterInstancesin interfaceOStorage
-
cleanOutRecord
- Specified by:
cleanOutRecordin interfaceOStorage
-
freeze
public final void freeze(boolean throwException) Description copied from interface:OFreezableStorageComponentAfter this method finished it's execution, all threads that are going to perform data modifications in storage should wait tillOFreezableStorageComponent.release()method will be called. This method will wait till all ongoing modifications will be finished.- Specified by:
freezein interfaceOFreezableStorageComponent- Parameters:
throwException- IftrueOModificationOperationProhibitedExceptionexception will be thrown on call of methods that requires storage modification. Otherwise other threads will wait forOFreezableStorageComponent.release()method call.
-
release
public final void release()Description copied from interface:OFreezableStorageComponentAfter 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.- Specified by:
releasein interfaceOFreezableStorageComponent
-
wereDataRestoredAfterOpen
public boolean wereDataRestoredAfterOpen()- Specified by:
wereDataRestoredAfterOpenin interfaceOStorage
-
wereNonTxOperationsPerformedInPreviousOpen
public boolean wereNonTxOperationsPerformedInPreviousOpen()- Specified by:
wereNonTxOperationsPerformedInPreviousOpenin interfaceOStorage
-
reload
public final void reload() -
pageIsBroken
Description copied from interface:OPageIsBrokenListenerMethod is called by write cache when it is detected that data page in file is broken.- Specified by:
pageIsBrokenin interfaceOPageIsBrokenListener- Parameters:
fileName- Name of broken file.pageIndex- Index of page which is broken in file.
-
requestCheckpoint
public final void requestCheckpoint()- Specified by:
requestCheckpointin interfaceOCheckpointRequestListener
-
higherPhysicalPositions
public final OPhysicalPosition[] higherPhysicalPositions(int currentClusterId, OPhysicalPosition physicalPosition) - Specified by:
higherPhysicalPositionsin interfaceOStorage
-
ceilingPhysicalPositions
public final OPhysicalPosition[] ceilingPhysicalPositions(int clusterId, OPhysicalPosition physicalPosition) - Specified by:
ceilingPhysicalPositionsin interfaceOStorage
-
lowerPhysicalPositions
public final OPhysicalPosition[] lowerPhysicalPositions(int currentClusterId, OPhysicalPosition physicalPosition) - Specified by:
lowerPhysicalPositionsin interfaceOStorage
-
floorPhysicalPositions
public final OPhysicalPosition[] floorPhysicalPositions(int clusterId, OPhysicalPosition physicalPosition) - Specified by:
floorPhysicalPositionsin interfaceOStorage
-
acquireWriteLock
- Specified by:
acquireWriteLockin interfaceOStorage
-
acquireWriteLock
-
releaseWriteLock
- Specified by:
releaseWriteLockin interfaceOStorage
-
acquireReadLock
-
acquireReadLock
- Specified by:
acquireReadLockin interfaceOStorage
-
releaseReadLock
- Specified by:
releaseReadLockin interfaceOStorage
-
getRecordConflictStrategy
- Specified by:
getRecordConflictStrategyin interfaceOStorage- Specified by:
getRecordConflictStrategyin interfaceOStorageInfo
-
setConflictStrategy
- Specified by:
setConflictStrategyin interfaceOStorage
-
getRecordScanned
public long getRecordScanned() -
copyWALToIncrementalBackup
protected abstract OLogSequenceNumber copyWALToIncrementalBackup(ZipOutputStream zipOutputStream, long startSegment) throws IOException - Throws:
IOException
-
isWriteAllowedDuringIncrementalBackup
protected abstract boolean isWriteAllowedDuringIncrementalBackup() -
getRecoverListener
-
registerRecoverListener
-
unregisterRecoverListener
-
createWalTempDirectory
-
addFileToDirectory
protected abstract void addFileToDirectory(String name, InputStream stream, File directory) throws IOException - Throws:
IOException
-
createWalFromIBUFiles
protected abstract OWriteAheadLog createWalFromIBUFiles(File directory, OContextConfiguration contextConfiguration, Locale locale, byte[] iv) throws IOException - Throws:
IOException
-
checkOpennessAndMigration
protected final void checkOpennessAndMigration()Checks if the storage is open. If it's closed an exception is raised. -
isInError
protected boolean isInError() -
checkErrorState
public void checkErrorState() -
makeFuzzyCheckpoint
public final void makeFuzzyCheckpoint() -
deleteTreeRidBag
-
flushAllData
protected void flushAllData() -
checkIfStorageDirty
- Throws:
IOException
-
initConfiguration
protected void initConfiguration(OAtomicOperation atomicOperation, OContextConfiguration contextConfiguration) throws IOException - Throws:
IOException
-
postCreateSteps
protected final void postCreateSteps() -
preCreateSteps
- Throws:
IOException
-
initWalAndDiskCache
protected abstract void initWalAndDiskCache(OContextConfiguration contextConfiguration) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
postCloseSteps
protected abstract void postCloseSteps(boolean onDelete, boolean internalError, long lastTxId) throws IOException - Throws:
IOException
-
preCloseSteps
-
postDeleteSteps
protected void postDeleteSteps() -
makeStorageDirty
- Throws:
IOException
-
clearStorageDirty
- Throws:
IOException
-
isDirty
protected boolean isDirty() -
getOpenedAtVersion
-
metadataOnly
public void metadataOnly(byte[] metadata) - Specified by:
metadataOnlyin interfaceOStorage
-
setClusterAttribute
- Specified by:
setClusterAttributein interfaceOStorage
-
doShutdown
- Throws:
IOException
-
doShutdownOnDelete
protected void doShutdownOnDelete() -
closeClusters
- Throws:
IOException
-
closeIndexes
-
incrementalSync
- Specified by:
incrementalSyncin interfaceOStorage
-
incrementalBackup
public String incrementalBackup(String backupDirectory, OCallable<Void, Void> started) throws UnsupportedOperationException- Specified by:
incrementalBackupin interfaceOStorage- Returns:
- Backup file name
- Throws:
UnsupportedOperationException
-
supportIncremental
public boolean supportIncremental()- Specified by:
supportIncrementalin interfaceOStorage
-
fullIncrementalBackup
- Specified by:
fullIncrementalBackupin interfaceOStorage- Throws:
UnsupportedOperationException
-
incrementalBackup
protected OLogSequenceNumber incrementalBackup(OutputStream stream, OLogSequenceNumber fromLsn, boolean singleThread) throws IOException - Throws:
IOException
-
incrementalBackup
protected OLogSequenceNumber incrementalBackup(OutputStream stream, OLogSequenceNumber fromLsn, boolean singleThread, boolean writeMetadata) throws IOException - Throws:
IOException
-
doEncryptionDecryption
protected static void doEncryptionDecryption(int mode, byte[] aesKey, long pageIndex, long fileId, byte[] backUpPage, byte[] encryptionIv) -
restoreFromIncrementalBackup
- Specified by:
restoreFromIncrementalBackupin interfaceOStorage
-
restoreFullIncrementalBackup
- Specified by:
restoreFullIncrementalBackupin interfaceOStorage- Throws:
UnsupportedOperationException
-
postProcessIncrementalRestore
protected void postProcessIncrementalRestore(OContextConfiguration contextConfiguration) throws IOException - Throws:
IOException
-
restoreFromIncrementalBackup
protected void restoreFromIncrementalBackup(String charset, Locale serverLocale, Locale locale, OContextConfiguration contextConfiguration, byte[] aesKey, InputStream inputStream, boolean isFull) throws IOException - Throws:
IOException
-
checkAndCleanPath
-
preprocessingIncrementalRestore
protected OQuarto<Locale,OContextConfiguration, preprocessingIncrementalRestore() throws IOExceptionString, Locale> - Throws:
IOException
-
restoreFrom
protected OLogSequenceNumber restoreFrom(OWriteAheadLog writeAheadLog, OLogSequenceNumber lsn) throws IOException - Throws:
IOException
-
restoreAtomicUnit
protected final boolean restoreAtomicUnit(List<OWALRecord> atomicUnit, OModifiableBoolean atLeastOnePageUpdate) throws IOException - Throws:
IOException
-
setStorageConfigurationUpdateListener
public void setStorageConfigurationUpdateListener(OStorageConfigurationUpdateListener storageConfigurationUpdateListener) - Specified by:
setStorageConfigurationUpdateListenerin interfaceOStorage
-
pauseConfigurationUpdateNotifications
public void pauseConfigurationUpdateNotifications()- Specified by:
pauseConfigurationUpdateNotificationsin interfaceOStorage
-
fireConfigurationUpdateNotifications
public void fireConfigurationUpdateNotifications()- Specified by:
fireConfigurationUpdateNotificationsin interfaceOStorage
-
getRidsGroupedByCluster
-
logAndPrepareForRethrow
-
logAndPrepareForRethrow
-
logAndPrepareForRethrow
-
logAndPrepareForRethrow
-
logAndPrepareForRethrow
-
getConfiguration
- Specified by:
getConfigurationin interfaceOStorageInfo
-
setSchemaRecordId
- Specified by:
setSchemaRecordIdin interfaceOStorage
-
setDateFormat
- Specified by:
setDateFormatin interfaceOStorage
-
setTimeZone
- Specified by:
setTimeZonein interfaceOStorage
-
setLocaleLanguage
- Specified by:
setLocaleLanguagein interfaceOStorage
-
setCharset
- Specified by:
setCharsetin interfaceOStorage
-
setIndexMgrRecordId
- Specified by:
setIndexMgrRecordIdin interfaceOStorage
-
setDateTimeFormat
- Specified by:
setDateTimeFormatin interfaceOStorage
-
setLocaleCountry
- Specified by:
setLocaleCountryin interfaceOStorage
-
setClusterSelection
- Specified by:
setClusterSelectionin interfaceOStorage
-
setMinimumClusters
public final void setMinimumClusters(int minimumClusters) - Specified by:
setMinimumClustersin interfaceOStorage
-
setValidation
public final void setValidation(boolean validation) - Specified by:
setValidationin interfaceOStorage
-
removeProperty
- Specified by:
removePropertyin interfaceOStorage
-
setProperty
- Specified by:
setPropertyin interfaceOStorage
-
setRecordSerializer
- Specified by:
setRecordSerializerin interfaceOStorage
-
clearProperties
public final void clearProperties()- Specified by:
clearPropertiesin interfaceOStorage
-
getLastMetadata
- Specified by:
getLastMetadatain interfaceOStorage
-
getVersionForKey
- Specified by:
getVersionForKeyin interfaceOStorage
-
getClustersIds
- Specified by:
getClustersIdsin interfaceOStorage
-
startDDL
public void startDDL() -
endDDL
public void endDDL() -
checkBackupRunning
protected void checkBackupRunning() -
getContext
- Specified by:
getContextin interfaceOStorage
-
isMemory
public boolean isMemory() -
endBackup
protected void endBackup() -
isIcrementalBackupRunning
public boolean isIcrementalBackupRunning()- Specified by:
isIcrementalBackupRunningin interfaceOStorage
-
isDDLRunning
protected boolean isDDLRunning() -
startBackup
protected void startBackup() -
removeIndexValuesContainer
- Specified by:
removeIndexValuesContainerin interfaceOStorage
-
createSBTree
- Specified by:
createSBTreein interfaceOStorage
-
getIndexApiVersion
public int getIndexApiVersion(int indexId) - Specified by:
getIndexApiVersionin interfaceOStorage
-