Package com.qfs.index
Interface IMultiVersionIndex
-
- All Superinterfaces:
IMultiVersion,IMultiVersionOperations,ITransactionalMultiVersion
- All Known Implementing Classes:
MultiVersionLazyDeleteLinkedIndex
public interface IMultiVersionIndex extends ITransactionalMultiVersion
Multiversion main index.- Author:
- ActiveViam
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IIndexVersioncommit(IEpoch epoch)Commits the pending transient state at the specified epoch.Runnabledestroy()Frees all resources held by this data structure.IIndexVersiongetMostRecentVersion()Retrieves the latest (i.e.IIndexTransactiongetOrCreateTransaction()Returns the current transaction.
The result is nevernullcontrary toITransactionalMultiVersion.getTransaction().IIndexTransactiongetTransaction()Returns the current transaction.-
Methods inherited from interface com.qfs.multiversion.ITransactionalMultiVersion
rollback
-
-
-
-
Method Detail
-
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
IIndexVersion commit(IEpoch epoch)
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:
ITransactionalMultiVersion.getOrCreateTransaction()
-
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:
ITransactionalMultiVersion.getTransaction()
-
-