Package com.arcadedb.engine
Class TransactionManager
- java.lang.Object
-
- com.arcadedb.engine.TransactionManager
-
public class TransactionManager extends Object
-
-
Constructor Summary
Constructors Constructor Description TransactionManager(DatabaseInternal database)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
applyChanges(WALFile.WALTransaction tx)
void
checkIntegrity()
void
close(boolean drop)
Binary
createTransactionBuffer(long txId, List<MutablePage> pages)
long
getNextTransactionId()
Map<String,Object>
getStats()
void
kill()
void
notifyPageFlushed(MutablePage page)
LockManager.LOCK_STATUS
tryLockFile(Integer fileId, long timeout)
List<Integer>
tryLockFiles(Collection<Integer> fileIds, long timeout)
Returns the locked files only.void
unlockFile(Integer fileId)
void
unlockFilesInOrder(List<Integer> lockedFileIds)
void
writeTransactionToWAL(List<MutablePage> pages, WALFile.FLUSH_TYPE sync, long txId, Binary bufferChanges)
-
-
-
Constructor Detail
-
TransactionManager
public TransactionManager(DatabaseInternal database)
-
-
Method Detail
-
close
public void close(boolean drop)
-
createTransactionBuffer
public Binary createTransactionBuffer(long txId, List<MutablePage> pages)
-
writeTransactionToWAL
public void writeTransactionToWAL(List<MutablePage> pages, WALFile.FLUSH_TYPE sync, long txId, Binary bufferChanges)
-
notifyPageFlushed
public void notifyPageFlushed(MutablePage page)
-
checkIntegrity
public void checkIntegrity()
-
applyChanges
public boolean applyChanges(WALFile.WALTransaction tx)
-
kill
public void kill()
-
getNextTransactionId
public long getNextTransactionId()
-
tryLockFiles
public List<Integer> tryLockFiles(Collection<Integer> fileIds, long timeout)
Returns the locked files only. In case the current thread already locked a resource, no error is thrown but the lock is not returned. In this way only the new acquired locks are released.
-
tryLockFile
public LockManager.LOCK_STATUS tryLockFile(Integer fileId, long timeout)
-
unlockFile
public void unlockFile(Integer fileId)
-
-