
public class ODistributedStorage extends Object implements OStorage, OFreezableStorageComponent, OAutoshardedStorage
OStorage.LOCKING_STRATEGY, OStorage.STATUSCLUSTER_DEFAULT_NAME| Constructor and Description |
|---|
ODistributedStorage(OServer iServer,
String dbName) |
public void replaceIfNeeded(OAbstractPaginatedStorage wrapped)
public void wrap(OAbstractPaginatedStorage wrapped)
public String getCreatedAtVersion()
SELECT FROM metadata:storage instead.getCreatedAtVersion in interface OStoragepublic boolean isDistributed()
isDistributed in interface OStoragepublic boolean isAssigningClusterIds()
isAssigningClusterIds in interface OStorageisAssigningClusterIds in interface OStorageInfopublic Object command(OCommandRequestText iCommand)
OStoragepublic void acquireDistributedExclusiveLock(long timeout)
acquireDistributedExclusiveLock in interface OAutoshardedStoragepublic void releaseDistributedExclusiveLock()
releaseDistributedExclusiveLock in interface OAutoshardedStoragepublic boolean isLocalEnv()
OAutoshardedStorageisLocalEnv in interface OAutoshardedStoragepublic OStorageOperationResult<ORawBuffer> readRecord(ORecordId iRecordId, String iFetchPlan, boolean iIgnoreCache, boolean prefetchRecords, ORecordCallback<ORawBuffer> iCallback)
readRecord in interface OStoragepublic OStorageOperationResult<ORawBuffer> readRecordIfVersionIsNotLatest(ORecordId rid, String fetchPlan, boolean ignoreCache, int recordVersion) throws ORecordNotFoundException
readRecordIfVersionIsNotLatest in interface OStorageORecordNotFoundExceptionpublic OStorageOperationResult<Boolean> deleteRecord(ORecordId iRecordId, int iVersion, int iMode, ORecordCallback<Boolean> iCallback)
deleteRecord in interface OStoragepublic OSBTreeCollectionManager getSBtreeCollectionManager()
getSBtreeCollectionManager in interface OStoragepublic ORecordMetadata getRecordMetadata(ORID rid)
getRecordMetadata in interface OStoragepublic boolean cleanOutRecord(ORecordId recordId, int recordVersion, int iMode, ORecordCallback<Boolean> callback)
cleanOutRecord in interface OStoragepublic boolean existsResource(String iName)
existsResource in interface OSharedContainerpublic String getClusterName(int clusterId)
getClusterName in interface OStoragepublic boolean setClusterAttribute(int id,
OCluster.ATTRIBUTES attribute,
Object value)
setClusterAttribute in interface OStoragepublic ORecordConflictStrategy getRecordConflictStrategy()
getRecordConflictStrategy in interface OStoragepublic void setConflictStrategy(ORecordConflictStrategy iResolver)
setConflictStrategy in interface OStoragepublic <T> T removeResource(String iName)
removeResource in interface OSharedContainerpublic <T> T getResource(String iName, Callable<T> iCallback)
getResource in interface OSharedContainerpublic void open(String iUserName, String iUserPassword, OContextConfiguration iProperties)
public void create(OContextConfiguration iProperties) throws IOException
create in interface OStorageIOExceptionpublic String incrementalBackup(String backupDirectory, OCallable<Void,Void> started)
incrementalBackup in interface OStoragepublic void restoreFromIncrementalBackup(String filePath)
restoreFromIncrementalBackup in interface OStoragepublic boolean supportIncremental()
supportIncremental in interface OStoragepublic void fullIncrementalBackup(OutputStream stream) throws UnsupportedOperationException
fullIncrementalBackup in interface OStorageUnsupportedOperationExceptionpublic void restoreFullIncrementalBackup(InputStream stream) throws UnsupportedOperationException
restoreFullIncrementalBackup in interface OStorageUnsupportedOperationExceptionpublic void closeOnDrop()
public List<ORecordOperation> commit(OTransactionInternal iTx)
public OStorageConfiguration getConfiguration()
getConfiguration in interface OStorageInfopublic int getClusters()
getClusters in interface OStorageInfopublic Set<String> getClusterNames()
getClusterNames in interface OStoragegetClusterNames in interface OStorageInfopublic Collection<? extends OCluster> getClusterInstances()
getClusterInstances in interface OStoragepublic int addCluster(String iClusterName, Object... iParameters)
OStorageaddCluster in interface OStorageiClusterName - name of the clusterpublic int addCluster(String iClusterName, int iRequestedId)
OStorageaddCluster in interface OStorageiClusterName - name of the clusteriRequestedId - requested id of the clusterpublic boolean dropCluster(String iClusterName)
dropCluster in interface OStoragepublic boolean dropCluster(int iId)
OStoragedropCluster in interface OStorageiId - id of the cluster to deletepublic String getClusterNameById(int clusterId)
getClusterNameById in interface OStoragepublic long getClusterRecordsSizeById(int clusterId)
getClusterRecordsSizeById in interface OStoragepublic long getClusterRecordsSizeByName(String clusterName)
getClusterRecordsSizeByName in interface OStoragepublic boolean setClusterAttribute(String clusterName, OCluster.ATTRIBUTES attribute, Object value)
setClusterAttribute in interface OStoragepublic String getClusterRecordConflictStrategy(int clusterId)
getClusterRecordConflictStrategy in interface OStoragepublic String getClusterEncryption(int clusterId)
getClusterEncryption in interface OStoragepublic boolean isSystemCluster(int clusterId)
isSystemCluster in interface OStoragepublic long getLastClusterPosition(int clusterId)
getLastClusterPosition in interface OStoragepublic long getClusterNextPosition(int clusterId)
getClusterNextPosition in interface OStoragepublic OPaginatedCluster.RECORD_STATUS getRecordStatus(ORID rid)
getRecordStatus in interface OStoragepublic long count(int iClusterId,
boolean countTombstones)
public long count(int[] iClusterIds,
boolean countTombstones)
public long getSize()
OStoragepublic long countRecords()
OStoragecountRecords in interface OStoragepublic int getDefaultClusterId()
getDefaultClusterId in interface OStorageInfopublic void setDefaultClusterId(int defaultClusterId)
setDefaultClusterId in interface OStoragepublic int getClusterIdByName(String iClusterName)
getClusterIdByName in interface OStoragepublic String getPhysicalClusterNameById(int iClusterId)
getPhysicalClusterNameById in interface OStoragepublic boolean checkForRecordValidity(OPhysicalPosition ppos)
checkForRecordValidity in interface OStoragepublic String getURL()
getURL in interface OStorageInfopublic long getVersion()
getVersion in interface OStoragepublic long[] getClusterDataRange(int currentClusterId)
OStoragegetClusterDataRange in interface OStoragecurrentClusterId - Cluster idpublic OStorage.STATUS getStatus()
OStoragepublic ODistributedStorageEventListener getEventListener()
public void setEventListener(ODistributedStorageEventListener eventListener)
public OPhysicalPosition[] higherPhysicalPositions(int currentClusterId, OPhysicalPosition entry)
higherPhysicalPositions in interface OStoragepublic OServer getServer()
public ODistributedServerManager getDistributedManager()
public ODistributedConfiguration getDistributedConfiguration()
public void setDistributedConfiguration(OModifiableDistributedConfiguration distributedConfiguration)
public OPhysicalPosition[] ceilingPhysicalPositions(int clusterId, OPhysicalPosition physicalPosition)
ceilingPhysicalPositions in interface OStoragepublic OPhysicalPosition[] floorPhysicalPositions(int clusterId, OPhysicalPosition physicalPosition)
floorPhysicalPositions in interface OStoragepublic OPhysicalPosition[] lowerPhysicalPositions(int currentClusterId, OPhysicalPosition entry)
lowerPhysicalPositions in interface OStoragepublic OStorage getUnderlying()
getUnderlying in interface OStoragepublic OCurrentStorageComponentsFactory getComponentsFactory()
getComponentsFactory in interface OStoragepublic String getType()
OStoragepublic void freeze(boolean throwException)
OFreezableStorageComponentOFreezableStorageComponent.release() method will be called. This method
will wait till all ongoing modifications will be finished.freeze in interface OFreezableStorageComponentthrowException - 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 void release()
OFreezableStorageComponentrelease in interface OFreezableStorageComponentpublic List<String> backup(OutputStream out, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener, int compressionLevel, int bufferSize) throws IOException
OBackupablebackup in interface OBackupableout - OutputStream used to write the backup content. Use a FileOutputStream to make the
backup persistent on diskoptions - Backup options as Mapcallable - Callback to execute when the database is lockediListener - Listener called for backup messagescompressionLevel - ZIP Compression level between 1 (the minimum) and 9 (maximum). The
bigger is the compression, the smaller will be the final backup content, but will consume
more CPU and time to executebufferSize - Buffer size in bytes, the bigger is the buffer, the more efficient will be
the compressionIOExceptionODatabaseExportpublic void restore(InputStream in, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener) throws IOException
OBackupablerestore in interface OBackupablein - InputStream used to read the backup content. Use a FileInputStream to read a backup
on a diskoptions - Backup options as Mapcallable - Callback to execute when the database is lockediListener - Listener called for backup messagesIOExceptionODatabaseImportpublic String getStorageId()
OAutoshardedStoragegetStorageId in interface OAutoshardedStoragepublic String getNodeId()
getNodeId in interface OAutoshardedStoragepublic void shutdown()
OStorageOrient.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.protected void checkNodeIsMaster(String localNodeName, ODistributedConfiguration dbCfg, String operation)
public OSyncSource getLastValidBackup()
public void setLastValidBackup(OSyncSource lastValidBackup)
protected void handleDistributedException(String iMessage, Exception e, Object... iParams)
public void resetLastValidBackup()
public void clearLastValidBackup()
protected void dropStorageFiles()
public static void dropStorageFiles(OLocalPaginatedStorage storage)
protected void saveDatabaseConfiguration()
protected File getDistributedConfigFile()
public ODistributedDatabase getLocalDistributedDatabase()
public void setSchemaRecordId(String schemaRecordId)
setSchemaRecordId in interface OStoragepublic void setDateFormat(String dateFormat)
setDateFormat in interface OStoragepublic void setTimeZone(TimeZone timeZoneValue)
setTimeZone in interface OStoragepublic void setLocaleLanguage(String locale)
setLocaleLanguage in interface OStoragepublic void setCharset(String charset)
setCharset in interface OStoragepublic void setIndexMgrRecordId(String indexMgrRecordId)
setIndexMgrRecordId in interface OStoragepublic void setDateTimeFormat(String dateTimeFormat)
setDateTimeFormat in interface OStoragepublic void setLocaleCountry(String localeCountry)
setLocaleCountry in interface OStoragepublic void setClusterSelection(String clusterSelection)
setClusterSelection in interface OStoragepublic void setMinimumClusters(int minimumClusters)
setMinimumClusters in interface OStoragepublic void setValidation(boolean validation)
setValidation in interface OStoragepublic void removeProperty(String property)
removeProperty in interface OStoragepublic void setProperty(String property, String value)
setProperty in interface OStoragepublic void setRecordSerializer(String recordSerializer, int version)
setRecordSerializer in interface OStoragepublic void clearProperties()
clearProperties in interface OStorageCopyright © 2009–2025 OrientDB. All rights reserved.