public class OLocalPaginatedStorage extends OAbstractPaginatedStorage
OAbstractPaginatedStorage.StartupMetadata
OStorage.LOCKING_STRATEGY, OStorage.STATUS
Modifier and Type | Field and Description |
---|---|
protected byte[] |
iv |
protected static String |
IV_NAME |
protected static long |
IV_SEED |
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 |
---|
OLocalPaginatedStorage(String name,
String filePath,
String mode,
int id,
OReadCache readCache,
OClosableLinkedContainer<Long,OFile> files,
long walMaxSegSize,
long doubleWriteLogMaxSegSize) |
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 iOutput,
int compressionLevel,
int bufferSize)
Executes a backup of the database.
|
protected OAbstractPaginatedStorage.StartupMetadata |
checkIfStorageDirty() |
protected void |
clearStorageDirty() |
protected OLogSequenceNumber |
copyWALToIncrementalBackup(ZipOutputStream zipOutputStream,
long startSegment) |
void |
create(OContextConfiguration contextConfiguration) |
protected OWriteAheadLog |
createWalFromIBUFiles(File directory,
OContextConfiguration contextConfiguration,
Locale locale,
byte[] iv) |
protected File |
createWalTempDirectory() |
static void |
deleteFilesFromDisc(String name,
int maxRetries,
int waitTime,
String databaseDirectory) |
boolean |
exists() |
static boolean |
exists(Path path) |
protected byte[] |
getIv() |
Path |
getStoragePath() |
String |
getType()
Returns the storage's type.
|
String |
getURL() |
protected void |
initConfiguration(OAtomicOperation atomicOperation,
OContextConfiguration contextConfiguration) |
protected void |
initIv() |
protected void |
initWalAndDiskCache(OContextConfiguration contextConfiguration) |
protected boolean |
isDirty() |
protected boolean |
isWriteAllowedDuringIncrementalBackup() |
protected void |
makeStorageDirty() |
protected String |
normalizeName(String name) |
protected void |
postCloseSteps(boolean onDelete,
boolean jvmError,
long lastTxId) |
protected void |
postCloseStepsAfterLock(Map<String,Object> params) |
protected void |
postDeleteSteps() |
protected Map<String,Object> |
preCloseSteps() |
protected void |
preCreateSteps() |
protected void |
readIv() |
void |
restore(InputStream in,
Map<String,Object> options,
Callable<Object> callable,
OCommandOutputListener iListener)
Executes a restore of a database backup.
|
acquireReadLock, acquireReadLock, acquireWriteLock, acquireWriteLock, addCluster, addCluster, addIndexEngine, browseCluster, callIndexEngine, ceilingPhysicalPositions, check, checkForRecordValidity, checkOpenness, checkReadOnlyConditions, cleanOutRecord, clearIndex, clearProperties, close, closeClusters, closeIndexes, command, commit, commit, commitPreAllocated, count, count, count, count, 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, isClosed, isDeleted, isRemote, isSystemCluster, iterateIndexEntriesBetween, iterateIndexEntriesMajor, iterateIndexEntriesMinor, loadExternalIndexEngine, loadIndexEngine, logAndPrepareForRethrow, logAndPrepareForRethrow, logAndPrepareForRethrow, lowDiskSpace, lowerPhysicalPositions, makeFullCheckpoint, makeFuzzyCheckpoint, onException, open, open, open, openClusters, openIndexes, pageIsBroken, pauseConfigurationUpdateNotifications, postCreateSteps, preallocateRids, 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, removeResource, shutdown, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, countRecords, dropCluster, getComponentsFactory, getName, getStatus, getUnderlying, getVersion, isAssigningClusterIds, isDistributed, shutdown
existsResource, getResource, removeResource
protected static final long IV_SEED
protected static final String IV_NAME
protected volatile byte[] iv
public OLocalPaginatedStorage(String name, String filePath, String mode, int id, OReadCache readCache, OClosableLinkedContainer<Long,OFile> files, long walMaxSegSize, long doubleWriteLogMaxSegSize)
public void create(OContextConfiguration contextConfiguration)
create
in interface OStorage
create
in class OAbstractPaginatedStorage
protected final String normalizeName(String name)
normalizeName
in class OStorageAbstract
public final boolean exists()
public String getURL()
getURL
in interface OStorageInfo
getURL
in class OStorageAbstract
public final Path getStoragePath()
public String getType()
OStorage
public final List<String> backup(OutputStream out, Map<String,Object> options, Callable<Object> callable, OCommandOutputListener iOutput, 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 lockediOutput
- 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 final 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) throws IOException
copyWALToIncrementalBackup
in class OAbstractPaginatedStorage
IOException
protected File createWalTempDirectory()
createWalTempDirectory
in class OAbstractPaginatedStorage
protected void addFileToDirectory(String name, InputStream stream, File directory) throws IOException
addFileToDirectory
in class OAbstractPaginatedStorage
IOException
protected OWriteAheadLog createWalFromIBUFiles(File directory, OContextConfiguration contextConfiguration, Locale locale, byte[] iv) throws IOException
createWalFromIBUFiles
in class OAbstractPaginatedStorage
IOException
protected OAbstractPaginatedStorage.StartupMetadata checkIfStorageDirty() throws IOException
checkIfStorageDirty
in class OAbstractPaginatedStorage
IOException
protected void initConfiguration(OAtomicOperation atomicOperation, OContextConfiguration contextConfiguration) throws IOException
initConfiguration
in class OAbstractPaginatedStorage
IOException
protected Map<String,Object> preCloseSteps()
preCloseSteps
in class OAbstractPaginatedStorage
protected void postCloseStepsAfterLock(Map<String,Object> params)
postCloseStepsAfterLock
in class OAbstractPaginatedStorage
protected void preCreateSteps() throws IOException
preCreateSteps
in class OAbstractPaginatedStorage
IOException
protected void postCloseSteps(boolean onDelete, boolean jvmError, long lastTxId) throws IOException
postCloseSteps
in class OAbstractPaginatedStorage
IOException
protected void postDeleteSteps()
postDeleteSteps
in class OAbstractPaginatedStorage
public static void deleteFilesFromDisc(String name, int maxRetries, int waitTime, String databaseDirectory)
protected void makeStorageDirty() throws IOException
makeStorageDirty
in class OAbstractPaginatedStorage
IOException
protected void clearStorageDirty() throws IOException
clearStorageDirty
in class OAbstractPaginatedStorage
IOException
protected boolean isDirty()
isDirty
in class OAbstractPaginatedStorage
protected boolean isWriteAllowedDuringIncrementalBackup()
isWriteAllowedDuringIncrementalBackup
in class OAbstractPaginatedStorage
protected void initIv() throws IOException
initIv
in class OAbstractPaginatedStorage
IOException
protected void readIv() throws IOException
readIv
in class OAbstractPaginatedStorage
IOException
protected byte[] getIv()
getIv
in class OAbstractPaginatedStorage
protected void initWalAndDiskCache(OContextConfiguration contextConfiguration) throws IOException, InterruptedException
initWalAndDiskCache
in class OAbstractPaginatedStorage
IOException
InterruptedException
public static boolean exists(Path path)
Copyright © 2009–2020 OrientDB. All rights reserved.