public abstract class ODurableComponent extends OSharedResourceAdaptive
startAtomicOperation(boolean)
method.endAtomicOperation(boolean)
method when atomic operation completes, passed in parameter should be
false
if atomic operation completes with success and true
if there were some exceptions and it is
needed to rollback given operation.Modifier and Type | Field and Description |
---|---|
protected OAtomicOperationsManager |
atomicOperationsManager |
protected OReadCache |
readCache |
protected OAbstractPaginatedStorage |
storage |
protected OWriteCache |
writeCache |
Constructor and Description |
---|
ODurableComponent(OAbstractPaginatedStorage storage,
String name,
String extension,
String lockName) |
Modifier and Type | Method and Description |
---|---|
protected long |
addFile(OAtomicOperation atomicOperation,
String fileName) |
protected OCacheEntry |
addPage(OAtomicOperation atomicOperation,
long fileId,
boolean initPage) |
protected void |
deleteFile(OAtomicOperation atomicOperation,
long fileId) |
protected void |
endAtomicOperation(boolean rollback) |
String |
getExtension() |
protected long |
getFilledUpTo(OAtomicOperation atomicOperation,
long fileId) |
String |
getFullName() |
String |
getLockName() |
String |
getName() |
protected boolean |
isFileExists(OAtomicOperation atomicOperation,
String fileName) |
protected OCacheEntry |
loadPageForRead(OAtomicOperation atomicOperation,
long fileId,
long pageIndex,
boolean checkPinnedPages) |
protected OCacheEntry |
loadPageForRead(OAtomicOperation atomicOperation,
long fileId,
long pageIndex,
boolean checkPinnedPages,
int pageCount) |
protected OCacheEntry |
loadPageForWrite(OAtomicOperation atomicOperation,
long fileId,
long pageIndex,
boolean checkPinnedPages) |
protected long |
openFile(OAtomicOperation atomicOperation,
String fileName) |
protected void |
pinPage(OAtomicOperation atomicOperation,
OCacheEntry cacheEntry) |
protected void |
releasePageFromRead(OAtomicOperation atomicOperation,
OCacheEntry cacheEntry) |
protected void |
releasePageFromWrite(OAtomicOperation atomicOperation,
OCacheEntry cacheEntry) |
void |
setName(String name) |
protected OAtomicOperation |
startAtomicOperation(boolean trackNonTxOperations) |
protected void |
truncateFile(OAtomicOperation atomicOperation,
long filedId) |
acquireExclusiveLock, acquireSharedLock, addUser, assertExclusiveLockHold, assertSharedLockHold, getUsers, isConcurrent, releaseExclusiveLock, releaseSharedLock, removeUser, tryAcquireExclusiveLock, tryAcquireSharedLock
protected final OAtomicOperationsManager atomicOperationsManager
protected final OAbstractPaginatedStorage storage
protected final OReadCache readCache
protected final OWriteCache writeCache
public ODurableComponent(OAbstractPaginatedStorage storage, String name, String extension, String lockName)
public String getLockName()
public String getName()
public void setName(String name)
public String getFullName()
public String getExtension()
protected void endAtomicOperation(boolean rollback) throws IOException
IOException
protected OAtomicOperation startAtomicOperation(boolean trackNonTxOperations) throws IOException
protected long getFilledUpTo(OAtomicOperation atomicOperation, long fileId)
protected OCacheEntry loadPageForWrite(OAtomicOperation atomicOperation, long fileId, long pageIndex, boolean checkPinnedPages) throws IOException
IOException
protected OCacheEntry loadPageForRead(OAtomicOperation atomicOperation, long fileId, long pageIndex, boolean checkPinnedPages) throws IOException
IOException
protected OCacheEntry loadPageForRead(OAtomicOperation atomicOperation, long fileId, long pageIndex, boolean checkPinnedPages, int pageCount) throws IOException
IOException
protected void pinPage(OAtomicOperation atomicOperation, OCacheEntry cacheEntry)
protected OCacheEntry addPage(OAtomicOperation atomicOperation, long fileId, boolean initPage) throws IOException
IOException
protected void releasePageFromWrite(OAtomicOperation atomicOperation, OCacheEntry cacheEntry)
protected void releasePageFromRead(OAtomicOperation atomicOperation, OCacheEntry cacheEntry)
protected long addFile(OAtomicOperation atomicOperation, String fileName) throws IOException
IOException
protected long openFile(OAtomicOperation atomicOperation, String fileName) throws IOException
IOException
protected void deleteFile(OAtomicOperation atomicOperation, long fileId) throws IOException
IOException
protected boolean isFileExists(OAtomicOperation atomicOperation, String fileName)
protected void truncateFile(OAtomicOperation atomicOperation, long filedId) throws IOException
IOException
Copyright © 2009–2019 OrientDB. All rights reserved.