Package com.qfs.index
Interface IMultiVersionIndex
- All Superinterfaces:
IMultiVersion,IMultiVersionOperations,ITransactionalMultiVersion
- All Known Implementing Classes:
MultiVersionLazyDeleteLinkedIndex
Multiversion main index.
- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionCommits the pending transient state at the specified epoch.destroy()Frees all resources held by this data structure.Retrieves the latest (i.e.Returns the current transaction.
The result is nevernullcontrary toITransactionalMultiVersion.getTransaction().Returns the current transaction.Methods inherited from interface com.qfs.multiversion.ITransactionalMultiVersion
rollback
-
Method Details
-
getMostRecentVersion
IIndexVersion getMostRecentVersion()Description copied from interface:IMultiVersionRetrieves the latest (i.e. current) version of the object.- Specified by:
getMostRecentVersionin interfaceIMultiVersion- Returns:
- the latest version of the object
-
commit
Description copied from interface:IMultiVersionOperationsCommits the pending transient state at the specified epoch.This automatically creates a new transient, writable state.
Thread-safety: unless specific otherwise by the implementing class, it is not thread-safe to call
IMultiVersionOperations.commit(IEpoch)andIMultiVersionOperations.rollback()concurrently.- Specified by:
commitin interfaceIMultiVersionOperations- Parameters:
epoch- the epoch associated with this commit- Returns:
- the version that prevails after this commit (possibly an untouched current version if the commit had absolutely no impact on the state)
-
getTransaction
IIndexTransaction getTransaction()Description copied from interface:ITransactionalMultiVersionReturns the current transaction.- Specified by:
getTransactionin interfaceITransactionalMultiVersion- Returns:
- the current transaction or
nullwhen there is no transaction - See Also:
-
getOrCreateTransaction
IIndexTransaction getOrCreateTransaction()Description copied from interface:ITransactionalMultiVersionReturns the current transaction.
The result is nevernullcontrary toITransactionalMultiVersion.getTransaction().THIS METHOD SHOULD BE CALLED ONLY IF
IMultiVersionOperations.commit(IEpoch)(orITransactionalMultiVersion.rollback()) IS GUARANTEED TO BE CALLED otherwise this could cause a memory leak if the transaction holds a version (because the multiversion will keep the transaction).- Specified by:
getOrCreateTransactionin interfaceITransactionalMultiVersion- Returns:
- the current transaction
- See Also:
-
destroy
Runnable destroy()Frees all resources held by this data structure.- Returns:
- the
Runnableto run to actually destroy the data
-