public class ODirectMemoryStorage extends OAbstractPaginatedStorage
OAbstractPaginatedStorage.StartupMetadata
OStorage.LOCKING_STRATEGY, OStorage.STATUS
atomicOperationsManager, atomicOperationsTable, fuzzyCheckpointExecutor, readCache, sbTreeCollectionManager, STORAGE_CONFIGURATION_INDEX_ID, writeAheadLog, writeCache
componentsFactory, configuration, mode, name, sharedContainer, stateLock, status, storageThreadGroup, url
CLUSTER_DEFAULT_NAME
Constructor and Description |
---|
ODirectMemoryStorage(String name,
String filePath,
String mode,
int id) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFileToDirectory(String name,
InputStream stream,
File directory) |
List<String> |
backup(OutputStream out,
Map<String,Object> options,
Callable<Object> callable,
OCommandOutputListener iListener,
int compressionLevel,
int bufferSize)
Executes a backup of the database.
|
protected OLogSequenceNumber |
copyWALToIncrementalBackup(ZipOutputStream zipOutputStream,
long startSegment) |
protected OWriteAheadLog |
createWalFromIBUFiles(File directory,
OContextConfiguration contextConfiguration,
Locale locale,
byte[] iv) |
protected File |
createWalTempDirectory() |
boolean |
exists() |
protected byte[] |
getIv() |
String |
getType()
Returns the storage's type.
|
String |
getURL() |
protected void |
initIv() |
protected void |
initWalAndDiskCache(OContextConfiguration contextConfiguration) |
protected boolean |
isWriteAllowedDuringIncrementalBackup() |
void |
makeFullCheckpoint() |
protected void |
postCloseSteps(boolean onDelete,
boolean jvmError,
long lastTxId) |
protected void |
readIv() |
void |
restore(InputStream in,
Map<String,Object> options,
Callable<Object> callable,
OCommandOutputListener iListener)
Executes a restore of a database backup.
|
void |
shutdown()
This method is called in
Orient.shutdown() method. |
acquireReadLock, acquireReadLock, acquireWriteLock, acquireWriteLock, addCluster, addCluster, addIndexEngine, browseCluster, callIndexEngine, ceilingPhysicalPositions, check, checkForRecordValidity, checkIfStorageDirty, checkOpenness, checkReadOnlyConditions, cleanOutRecord, clearIndex, clearProperties, clearStorageDirty, close, closeClusters, closeIndexes, command, commit, commit, commitPreAllocated, count, count, count, count, create, createRecord, delete, deleteIndexEngine, deleteRecord, dropCluster, executeCommand, extractEngineAPIVersion, extractTransactionsFromWal, fireConfigurationUpdateNotifications, floorPhysicalPositions, freeze, fullIncrementalBackup, getAtomicOperationsManager, getClusterDataRange, getClusterEncryption, getClusterIdByName, getClusterInstances, getClusterName, getClusterNameById, getClusterNames, getClusterNextPosition, getClusterRecordConflictStrategy, getClusterRecordsSizeById, getClusterRecordsSizeByName, getClusters, getConfiguration, getCreatedAtVersion, getDefaultClusterId, getFullCheckpointCount, getId, getIdGen, getIndexDescStream, getIndexEngine, getIndexKeyStream, getIndexSize, getIndexStream, getIndexValue, getIndexValues, getLastCloseTime, getLastClusterPosition, getLastMetadata, getLSN, getMode, getPhysicalClusterNameById, getReadCache, getRecordConflictStrategy, getRecordMetadata, getRecordScanned, getRecordStatus, getRecoverListener, getRidsGroupedByCluster, getSBtreeCollectionManager, getSessionCount, getSize, getStorageTransaction, getUuid, getWALInstance, getWriteCache, handleJVMError, hasIndexRangeQuerySupport, higherPhysicalPositions, incOnOpen, incrementalBackup, initConfiguration, isClosed, isDeleted, isDirty, isRemote, isSystemCluster, iterateIndexEntriesBetween, iterateIndexEntriesMajor, iterateIndexEntriesMinor, loadExternalIndexEngine, loadIndexEngine, logAndPrepareForRethrow, logAndPrepareForRethrow, logAndPrepareForRethrow, lowDiskSpace, lowerPhysicalPositions, makeFuzzyCheckpoint, makeStorageDirty, onException, open, open, open, openClusters, openIndexes, pageIsBroken, pauseConfigurationUpdateNotifications, postCloseStepsAfterLock, postCreateSteps, postDeleteSteps, preallocateRids, preCloseSteps, preCreateSteps, putIndexValue, putRidIndexEntry, readRecord, readRecordIfVersionIsNotLatest, registerRecoverListener, release, releaseReadLock, releaseWriteLock, reload, removeKeyFromIndex, removeProperty, removeRidIndexEntry, requestCheckpoint, restoreAtomicUnit, restoreFrom, restoreFromIncrementalBackup, restoreFullIncrementalBackup, rollback, serializeDeltaContent, setCharset, setClusterAttribute, setClusterAttribute, setClusterSelection, setConflictStrategy, setDateFormat, setDateTimeFormat, setDefaultClusterId, setIndexMgrRecordId, setLocaleCountry, setLocaleLanguage, setMinimumClusters, setProperty, setRecordSerializer, setSchemaRecordId, setStorageConfigurationUpdateListener, setTimeZone, setValidation, supportIncremental, synch, tryToDeleteTreeRidBag, underDistributedStorage, unregisterRecoverListener, updateIndexEntry, updateRecord, validatedPutIndexValue, wereDataRestoredAfterOpen, wereNonTxOperationsPerformedInPreviousOpen
close, countRecords, dropCluster, existsResource, getComponentsFactory, getName, getResource, getStatus, getUnderlying, getVersion, isAssigningClusterIds, isDistributed, normalizeName, removeResource, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, countRecords, dropCluster, getComponentsFactory, getName, getStatus, getUnderlying, getVersion, isAssigningClusterIds, isDistributed
existsResource, getResource, removeResource
protected void initWalAndDiskCache(OContextConfiguration contextConfiguration)
initWalAndDiskCache
in class OAbstractPaginatedStorage
protected void postCloseSteps(boolean onDelete, boolean jvmError, long lastTxId)
postCloseSteps
in class OAbstractPaginatedStorage
public boolean exists()
public String getType()
OStorage
public String getURL()
getURL
in interface OStorageInfo
getURL
in class OStorageAbstract
public void makeFullCheckpoint()
makeFullCheckpoint
in class OAbstractPaginatedStorage
protected void readIv()
readIv
in class OAbstractPaginatedStorage
protected byte[] getIv()
getIv
in class OAbstractPaginatedStorage
protected void initIv()
initIv
in class OAbstractPaginatedStorage
public List<String> backup(OutputStream out, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener, int compressionLevel, int bufferSize)
OBackupable
out
- 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 compressionODatabaseExport
public void restore(InputStream in, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iListener)
OBackupable
in
- 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 messagesODatabaseImport
protected OLogSequenceNumber copyWALToIncrementalBackup(ZipOutputStream zipOutputStream, long startSegment)
copyWALToIncrementalBackup
in class OAbstractPaginatedStorage
protected boolean isWriteAllowedDuringIncrementalBackup()
isWriteAllowedDuringIncrementalBackup
in class OAbstractPaginatedStorage
protected File createWalTempDirectory()
createWalTempDirectory
in class OAbstractPaginatedStorage
protected void addFileToDirectory(String name, InputStream stream, File directory)
addFileToDirectory
in class OAbstractPaginatedStorage
protected OWriteAheadLog createWalFromIBUFiles(File directory, OContextConfiguration contextConfiguration, Locale locale, byte[] iv)
createWalFromIBUFiles
in class OAbstractPaginatedStorage
public void shutdown()
OStorage
Orient.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.shutdown
in interface OStorage
shutdown
in class OStorageAbstract
Copyright © 2009–2020 OrientDB. All rights reserved.