Package org.eclipse.emf.cdo.transaction
Interface CDOTransaction
- All Superinterfaces:
CDOBranchPoint,CDOBranchProvider,CDOChangeSetDataProvider,CDOCommitHistory.Provider<CDOObject,,CDOObjectHistory> CDOCommonTransaction,CDOCommonView,CDORevisionProvider,CDOTimeProvider,CDOUpdatable,CDOUserTransaction,CDOView,org.eclipse.net4j.util.collection.Closeable,IAdaptable,org.eclipse.net4j.util.container.IContainer<CDOResourceNode>,org.eclipse.net4j.util.event.INotifier,org.eclipse.net4j.util.options.IOptionsContainer,org.eclipse.net4j.util.properties.IPropertiesContainer
- All Known Subinterfaces:
InternalCDOTransaction
- All Known Implementing Classes:
CDOPushTransaction
public interface CDOTransaction
extends CDOView, CDOCommonTransaction, CDOUserTransaction, CDOChangeSetDataProvider
A read-write view to the current (i.e. latest) state of the object graph in the repository.
- Since:
- 2.0
- Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA value type that combines the result of a persistable computation and thecommit infoof the finaltransaction commit.static interfaceEncapsulates a set of notifyingtransactionconfiguration options.Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
org.eclipse.net4j.util.container.IContainer.Modifiable<E extends Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends Object>Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2 -
Field Summary
Fields inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchPoint
INVALID_DATE, UNSPECIFIED_DATEFields inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable
NO_TIMEOUTFields inherited from interface org.eclipse.emf.cdo.view.CDOView
PROP_LIFECYCLE_EXCEPTION_HANDLER, PROP_TIME_MACHINE_DISABLED -
Method Summary
Modifier and TypeMethodDescriptionvoidcommit(Runnable runnable, int attempts, IProgressMonitor monitor) commit(Runnable runnable, Predicate<Long> retry, IProgressMonitor monitor) commit(Runnable runnable, org.eclipse.net4j.util.Predicate<Long> retry, IProgressMonitor monitor) Deprecated.<T> CDOTransaction.CommitResult<T>commit(Callable<T> callable, int attempts, IProgressMonitor monitor) <T> CDOTransaction.CommitResult<T>commit(Callable<T> callable, Predicate<Long> retry, IProgressMonitor monitor) <T> CDOTransaction.CommitResult<T>commit(Callable<T> callable, org.eclipse.net4j.util.Predicate<Long> retry, IProgressMonitor monitor) Deprecated.commitAndClose(IProgressMonitor monitor, boolean keepOpenAfterCommitProblem) createBinaryResource(String path) createQuery(String language, String queryString, boolean considerDirtyState) createQuery(String language, String queryString, Object context, boolean considerDirtyState) createResource(String path) createResourceFolder(String path) createTextResource(String path) Returns the comment to be used in the next commit operation.getCommitProperty(String key) Returns the set of objects that are conflicting with remote modifications or an empty set ifhasConflict()returnsfalse.longgetOrCreateResource(String path) booleanReturnstrueif this transaction contains local modifications that are conflicting with remote modifications,falseotherwise.importChanges(InputStream in, boolean reconstructSavepoints) booleanisDirty()Returnstrueif this transaction is not closed and contains uncommitted changes,falseotherwise.merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOBranchPoint targetBase, CDOMerger merger) Merges the changes between the given source base point and the given source point into this transaction.merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOMerger merger) Merges the changes between the given source base point and the given source point into this transaction.merge(CDOBranchPoint source, CDOMerger merger) Merges the changes from the given source point into this transaction and possibly considers previous merges from thatbranchby inspecting themerge sourceinformation of thecommit history.Merges the changes from the given source branch into this transaction and possibly considers previous merges from that branch by inspecting themerge sourceinformation of thecommit history.options()Returns theoptionsof this view.voidrevertTo(CDOBranchPoint branchPoint) voidsetCommitComment(String comment) Sets the comment to be used in the next commit operation.setCommitProperty(String key, String value) voidsetCommittables(Set<? extends EObject> committables) Creates a save point in theCDOTransactionthat can be used to roll back a part of the transactionMethods inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchPoint
getBranch, getTimeStampMethods inherited from interface org.eclipse.emf.cdo.common.commit.CDOChangeSetDataProvider
getChangeSetDataMethods inherited from interface org.eclipse.emf.cdo.common.commit.CDOCommitHistory.Provider
getHistory, getHistoryMethods inherited from interface org.eclipse.emf.cdo.common.CDOCommonView
getDurableLockingID, getLockOwner, getSessionID, getViewID, isDurableView, isHistorical, isReadOnlyMethods inherited from interface org.eclipse.emf.cdo.common.revision.CDORevisionProvider
getRevisionMethods inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable
getLastUpdateTime, runAfterUpdate, waitForUpdate, waitForUpdateMethods inherited from interface org.eclipse.emf.cdo.transaction.CDOUserTransaction
commit, commit, rollbackMethods inherited from interface org.eclipse.emf.cdo.view.CDOView
addObjectHandler, addRegistrationHandler, compareRevisions, createQuery, createQuery, createResourceURI, disableDurableLocking, enableDurableLocking, enableDurableLocking, getBinaryResource, getLockStates, getLockStates, getLockStatesOfObjects, getObject, getObject, getObject, getObjectHandlers, getObjects, getProvider, getRegistrationHandlers, getResource, getResource, getResourceFolder, getResourceNode, getResourceSet, getRootResource, getSession, getTextResource, getUnitManager, getURI, getURIHandler, getViewLock, getViewSet, hasResource, isInvalidating, isInvalidationRunnerActive, isLegacyModeEnabled, isObjectRegistered, lockObjects, lockObjects, queryInstances, queryInstancesAsync, queryInstancesAsync, queryResources, queryResourcesAsync, queryXRefs, queryXRefs, queryXRefsAsync, refreshLockStates, reload, removeObjectHandler, removeRegistrationHandler, setBranch, setBranch, setBranchPoint, setBranchPoint, setBranchPoint, setBranchPoint, setResourcePathCache, setTimeStamp, setTimeStamp, syncExec, syncExec, unlockObjects, unlockObjects, unlockObjectsMethods inherited from interface org.eclipse.net4j.util.collection.Closeable
close, isClosedMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.eclipse.net4j.util.container.IContainer
getElements, isEmptyMethods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListenerMethods inherited from interface org.eclipse.net4j.util.properties.IPropertiesContainer
properties
-
Method Details
-
isDirty
boolean isDirty()Returnstrueif this transaction is not closed and contains uncommitted changes,falseotherwise. -
hasConflict
boolean hasConflict()Returnstrueif this transaction contains local modifications that are conflicting with remote modifications,falseotherwise.- Specified by:
hasConflictin interfaceCDOView- See Also:
-
getConflicts
Returns the set of objects that are conflicting with remote modifications or an empty set ifhasConflict()returnsfalse. -
revertTo
- Since:
- 4.15
-
merge
Merges the changes from the given source branch into this transaction and possibly considers previous merges from that branch by inspecting themerge sourceinformation of thecommit history.- Since:
- 4.6
- See Also:
-
merge
Merges the changes from the given source point into this transaction and possibly considers previous merges from thatbranchby inspecting themerge sourceinformation of thecommit history.- Since:
- 3.0
-
merge
Merges the changes between the given source base point and the given source point into this transaction.Warning: If the branch of this transaction already contains merges from the given source point range (i.e., if this merge is a "remerge") this method will likely fail. One of the following methods should be used instead:
- Since:
- 4.0
-
merge
CDOChangeSetData merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOBranchPoint targetBase, CDOMerger merger) Merges the changes between the given source base point and the given source point into this transaction.When specifying an adequate target base point this method is able to perform a proper "remerge".
- Since:
- 4.6
- See Also:
-
createResourceFolder
- Throws:
CDOResourceNodeNotFoundException- Since:
- 4.0
-
getOrCreateResourceFolder
- Since:
- 4.0
-
createResource
- See Also:
-
getOrCreateResource
-
createTextResource
- Since:
- 4.2
-
getOrCreateTextResource
- Since:
- 4.2
-
createBinaryResource
- Since:
- 4.2
-
getOrCreateBinaryResource
- Since:
- 4.2
-
addTransactionHandler
- Since:
- 4.0
-
removeTransactionHandler
- Since:
- 4.0
-
getTransactionHandlers
CDOTransactionHandler[] getTransactionHandlers()- Since:
- 3.0
-
getTransactionHandlers1
CDOTransactionHandler1[] getTransactionHandlers1()- Since:
- 4.0
-
getTransactionHandlers2
CDOTransactionHandler2[] getTransactionHandlers2()- Since:
- 4.0
-
setSavepoint
CDOSavepoint setSavepoint()Description copied from interface:CDOUserTransactionCreates a save point in theCDOTransactionthat can be used to roll back a part of the transactionSave points do not involve the server side, everything is done on the client side.
- Specified by:
setSavepointin interfaceCDOUserTransaction- Since:
- 3.0
-
getFirstSavepoint
CDOSavepoint getFirstSavepoint()- Since:
- 4.1
-
getLastSavepoint
CDOSavepoint getLastSavepoint()- Specified by:
getLastSavepointin interfaceCDOUserTransaction- Since:
- 3.0
-
getNewObjects
-
getDetachedObjects
- Since:
- 2.0
-
getDirtyObjects
-
getRevisionDeltas
Map<CDOID,CDORevisionDelta> getRevisionDeltas() -
exportChanges
- Throws:
IOException- Since:
- 3.0
-
importChanges
- Throws:
IOException- Since:
- 3.0
-
getLastCommitTime
long getLastCommitTime() -
getCommitComment
String getCommitComment()Returns the comment to be used in the next commit operation.- Since:
- 3.0
- See Also:
-
setCommitComment
Sets the comment to be used in the next commit operation.- Since:
- 3.0
- See Also:
-
getCommitProperty
- Since:
- 4.25
-
setCommitProperty
- Since:
- 4.25
-
setCommittables
- Since:
- 4.0
-
getCommittables
- Since:
- 4.0
-
createQuery
- Since:
- 4.0
-
createQuery
CDOQuery createQuery(String language, String queryString, Object context, boolean considerDirtyState) - Since:
- 4.0
-
commit
@Deprecated <T> CDOTransaction.CommitResult<T> commit(Callable<T> callable, org.eclipse.net4j.util.Predicate<Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, Exception Deprecated.- Throws:
ConcurrentAccessExceptionCommitExceptionException- Since:
- 4.8
-
commit
<T> CDOTransaction.CommitResult<T> commit(Callable<T> callable, Predicate<Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, Exception - Throws:
ConcurrentAccessExceptionCommitExceptionException- Since:
- 4.9
-
commit
<T> CDOTransaction.CommitResult<T> commit(Callable<T> callable, int attempts, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, Exception - Throws:
ConcurrentAccessExceptionCommitExceptionException- Since:
- 4.8
-
commit
@Deprecated CDOCommitInfo commit(Runnable runnable, org.eclipse.net4j.util.Predicate<Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException Deprecated.- Throws:
ConcurrentAccessExceptionCommitException- Since:
- 4.8
-
commit
CDOCommitInfo commit(Runnable runnable, Predicate<Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException - Throws:
ConcurrentAccessExceptionCommitException- Since:
- 4.9
-
commit
CDOCommitInfo commit(Runnable runnable, int attempts, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException - Throws:
ConcurrentAccessExceptionCommitException- Since:
- 4.8
-
commitAndClose
CDOCommitInfo commitAndClose(IProgressMonitor monitor, boolean keepOpenAfterCommitProblem) throws CommitException - Throws:
CommitException- Since:
- 4.21
-
options
CDOTransaction.Options options()Description copied from interface:CDOCommonViewReturns theoptionsof this view.- Specified by:
optionsin interfaceCDOCommonView- Specified by:
optionsin interfaceCDOView- Specified by:
optionsin interfaceorg.eclipse.net4j.util.options.IOptionsContainer
-
commit(Runnable, java.util.function.Predicate, IProgressMonitor).