Package org.eclipse.emf.cdo.transaction
Interface CDOTransaction
-
- All Superinterfaces:
CDOBranchPoint
,CDOBranchProvider
,CDOChangeSetDataProvider
,CDOCommitHistory.Provider<CDOObject,CDOObjectHistory>
,CDOCommonTransaction
,CDOCommonView
,CDOLockOwner
,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 Classes Modifier and Type Interface Description static class
CDOTransaction.CommitResult<T>
A value type that combines the result of a persistable computation and thecommit info
of the finaltransaction commit
.static interface
CDOTransaction.Options
Encapsulates a set of notifyingtransaction
configuration options.-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
org.eclipse.net4j.util.container.IContainer.Modifiable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends java.lang.Object>
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchPoint
INVALID_DATE, UNSPECIFIED_DATE
-
Fields inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable
NO_TIMEOUT
-
Fields inherited from interface org.eclipse.emf.cdo.view.CDOView
PROP_TIME_MACHINE_DISABLED
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addTransactionHandler(CDOTransactionHandlerBase handler)
CDOCommitInfo
commit(java.lang.Runnable runnable, int attempts, IProgressMonitor monitor)
CDOCommitInfo
commit(java.lang.Runnable runnable, java.util.function.Predicate<java.lang.Long> retry, IProgressMonitor monitor)
CDOCommitInfo
commit(java.lang.Runnable runnable, org.eclipse.net4j.util.Predicate<java.lang.Long> retry, IProgressMonitor monitor)
Deprecated.<T> CDOTransaction.CommitResult<T>
commit(java.util.concurrent.Callable<T> callable, int attempts, IProgressMonitor monitor)
<T> CDOTransaction.CommitResult<T>
commit(java.util.concurrent.Callable<T> callable, java.util.function.Predicate<java.lang.Long> retry, IProgressMonitor monitor)
<T> CDOTransaction.CommitResult<T>
commit(java.util.concurrent.Callable<T> callable, org.eclipse.net4j.util.Predicate<java.lang.Long> retry, IProgressMonitor monitor)
Deprecated.CDOBinaryResource
createBinaryResource(java.lang.String path)
CDOQuery
createQuery(java.lang.String language, java.lang.String queryString, boolean considerDirtyState)
CDOQuery
createQuery(java.lang.String language, java.lang.String queryString, java.lang.Object context, boolean considerDirtyState)
CDOResource
createResource(java.lang.String path)
CDOResourceFolder
createResourceFolder(java.lang.String path)
CDOTextResource
createTextResource(java.lang.String path)
CDOSavepoint[]
exportChanges(java.io.OutputStream out)
java.lang.String
getCommitComment()
Returns the comment to be used in the next commit operation.java.util.Set<? extends EObject>
getCommittables()
java.util.Set<CDOObject>
getConflicts()
Returns the set of objects that are conflicting with remote modifications or an empty set ifhasConflict()
returnsfalse
.java.util.Map<CDOID,CDOObject>
getDetachedObjects()
java.util.Map<CDOID,CDOObject>
getDirtyObjects()
CDOSavepoint
getFirstSavepoint()
long
getLastCommitTime()
CDOSavepoint
getLastSavepoint()
java.util.Map<CDOID,CDOObject>
getNewObjects()
CDOBinaryResource
getOrCreateBinaryResource(java.lang.String path)
CDOResource
getOrCreateResource(java.lang.String path)
CDOResourceFolder
getOrCreateResourceFolder(java.lang.String path)
CDOTextResource
getOrCreateTextResource(java.lang.String path)
java.util.Map<CDOID,CDORevisionDelta>
getRevisionDeltas()
CDOTransactionHandler[]
getTransactionHandlers()
CDOTransactionHandler1[]
getTransactionHandlers1()
CDOTransactionHandler2[]
getTransactionHandlers2()
boolean
hasConflict()
Returnstrue
if this transaction contains local modifications that are conflicting with remote modifications,false
otherwise.CDOSavepoint[]
importChanges(java.io.InputStream in, boolean reconstructSavepoints)
boolean
isDirty()
Returnstrue
if this transaction is not closed and contains uncommitted changes,false
otherwise.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.CDOChangeSetData
merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOMerger merger)
Merges the changes between the given source base point and the given source point into this transaction.CDOChangeSetData
merge(CDOBranchPoint source, CDOMerger merger)
Merges the changes from the given source point into this transaction and possibly considers previous merges from thatbranch
by inspecting themerge source
information of thecommit history
.CDOChangeSetData
merge(CDOBranch source, CDOMerger merger)
Merges the changes from the given source branch into this transaction and possibly considers previous merges from that branch by inspecting themerge source
information of thecommit history
.CDOTransaction.Options
options()
Returns theoptions
of this view.void
removeTransactionHandler(CDOTransactionHandlerBase handler)
void
setCommitComment(java.lang.String comment)
Sets the comment to be used in the next commit operation.void
setCommittables(java.util.Set<? extends EObject> committables)
CDOSavepoint
setSavepoint()
Creates a save point in theCDOTransaction
that can be used to roll back a part of the transaction-
Methods inherited from interface org.eclipse.emf.cdo.common.branch.CDOBranchPoint
getBranch, getTimeStamp
-
Methods inherited from interface org.eclipse.emf.cdo.common.commit.CDOChangeSetDataProvider
getChangeSetData
-
Methods inherited from interface org.eclipse.emf.cdo.common.commit.CDOCommitHistory.Provider
getHistory, getHistory
-
Methods inherited from interface org.eclipse.emf.cdo.common.CDOCommonView
getDurableLockingID, getViewID, isHistorical, isReadOnly
-
Methods inherited from interface org.eclipse.emf.cdo.common.lock.CDOLockOwner
getSessionID, isDurableView
-
Methods inherited from interface org.eclipse.emf.cdo.common.revision.CDORevisionProvider
getRevision
-
Methods inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable
getLastUpdateTime, runAfterUpdate, waitForUpdate, waitForUpdate
-
Methods inherited from interface org.eclipse.emf.cdo.transaction.CDOUserTransaction
commit, commit, rollback
-
Methods inherited from interface org.eclipse.emf.cdo.view.CDOView
addObjectHandler, addRegistrationHandler, compareRevisions, createQuery, createQuery, createResourceURI, disableDurableLocking, enableDurableLocking, enableDurableLocking, getBinaryResource, getLockStates, getLockStatesOfObjects, getObject, getObject, getObject, getObjectHandlers, getObjects, getProvider, getRegistrationHandlers, getResource, getResource, getResourceFolder, getResourceNode, getResourceSet, getRootResource, getSession, getTextResource, getUnitManager, 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, unlockObjects
-
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
-
-
-
Method Detail
-
isDirty
boolean isDirty()
Returnstrue
if this transaction is not closed and contains uncommitted changes,false
otherwise.
-
hasConflict
boolean hasConflict()
Returnstrue
if this transaction contains local modifications that are conflicting with remote modifications,false
otherwise.- Specified by:
hasConflict
in interfaceCDOView
- See Also:
hasConflict()
-
getConflicts
java.util.Set<CDOObject> getConflicts()
Returns the set of objects that are conflicting with remote modifications or an empty set ifhasConflict()
returnsfalse
.
-
merge
CDOChangeSetData merge(CDOBranch source, CDOMerger merger)
Merges the changes from the given source branch into this transaction and possibly considers previous merges from that branch by inspecting themerge source
information of thecommit history
.- Since:
- 4.6
- See Also:
merge(CDOBranchPoint, CDOMerger)
-
merge
CDOChangeSetData merge(CDOBranchPoint source, CDOMerger merger)
Merges the changes from the given source point into this transaction and possibly considers previous merges from thatbranch
by inspecting themerge source
information of thecommit history
.- Since:
- 3.0
-
merge
CDOChangeSetData merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOMerger merger)
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:
merge(CDOBranchPoint, CDOMerger)
,merge(CDOBranch, CDOMerger)
-
createResourceFolder
CDOResourceFolder createResourceFolder(java.lang.String path) throws CDOResourceNodeNotFoundException
- Throws:
CDOResourceNodeNotFoundException
- Since:
- 4.0
-
getOrCreateResourceFolder
CDOResourceFolder getOrCreateResourceFolder(java.lang.String path)
- Since:
- 4.0
-
createResource
CDOResource createResource(java.lang.String path)
- See Also:
ResourceSet.createResource(URI)
-
getOrCreateResource
CDOResource getOrCreateResource(java.lang.String path)
-
createTextResource
CDOTextResource createTextResource(java.lang.String path)
- Since:
- 4.2
-
getOrCreateTextResource
CDOTextResource getOrCreateTextResource(java.lang.String path)
- Since:
- 4.2
-
createBinaryResource
CDOBinaryResource createBinaryResource(java.lang.String path)
- Since:
- 4.2
-
getOrCreateBinaryResource
CDOBinaryResource getOrCreateBinaryResource(java.lang.String path)
- Since:
- 4.2
-
addTransactionHandler
void addTransactionHandler(CDOTransactionHandlerBase handler)
- Since:
- 4.0
-
removeTransactionHandler
void removeTransactionHandler(CDOTransactionHandlerBase handler)
- 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:CDOUserTransaction
Creates a save point in theCDOTransaction
that 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:
setSavepoint
in interfaceCDOUserTransaction
- Since:
- 3.0
-
getFirstSavepoint
CDOSavepoint getFirstSavepoint()
- Since:
- 4.1
-
getLastSavepoint
CDOSavepoint getLastSavepoint()
- Specified by:
getLastSavepoint
in interfaceCDOUserTransaction
- Since:
- 3.0
-
getRevisionDeltas
java.util.Map<CDOID,CDORevisionDelta> getRevisionDeltas()
-
exportChanges
CDOSavepoint[] exportChanges(java.io.OutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
- Since:
- 3.0
-
importChanges
CDOSavepoint[] importChanges(java.io.InputStream in, boolean reconstructSavepoints) throws java.io.IOException
- Throws:
java.io.IOException
- Since:
- 3.0
-
getLastCommitTime
long getLastCommitTime()
-
getCommitComment
java.lang.String getCommitComment()
Returns the comment to be used in the next commit operation.- Since:
- 3.0
- See Also:
CDOCommitInfo.getComment()
-
setCommitComment
void setCommitComment(java.lang.String comment)
Sets the comment to be used in the next commit operation.- Since:
- 3.0
- See Also:
CDOCommitInfo.getComment()
-
setCommittables
void setCommittables(java.util.Set<? extends EObject> committables)
- Since:
- 4.0
-
getCommittables
java.util.Set<? extends EObject> getCommittables()
- Since:
- 4.0
-
createQuery
CDOQuery createQuery(java.lang.String language, java.lang.String queryString, boolean considerDirtyState)
- Since:
- 4.0
-
createQuery
CDOQuery createQuery(java.lang.String language, java.lang.String queryString, java.lang.Object context, boolean considerDirtyState)
- Since:
- 4.0
-
commit
@Deprecated <T> CDOTransaction.CommitResult<T> commit(java.util.concurrent.Callable<T> callable, org.eclipse.net4j.util.Predicate<java.lang.Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, java.lang.Exception
Deprecated.- Throws:
ConcurrentAccessException
CommitException
java.lang.Exception
- Since:
- 4.8
-
commit
<T> CDOTransaction.CommitResult<T> commit(java.util.concurrent.Callable<T> callable, java.util.function.Predicate<java.lang.Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, java.lang.Exception
- Throws:
ConcurrentAccessException
CommitException
java.lang.Exception
- Since:
- 4.9
-
commit
<T> CDOTransaction.CommitResult<T> commit(java.util.concurrent.Callable<T> callable, int attempts, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, java.lang.Exception
- Throws:
ConcurrentAccessException
CommitException
java.lang.Exception
- Since:
- 4.8
-
commit
@Deprecated CDOCommitInfo commit(java.lang.Runnable runnable, org.eclipse.net4j.util.Predicate<java.lang.Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException
Deprecated.- Throws:
ConcurrentAccessException
CommitException
- Since:
- 4.8
-
commit
CDOCommitInfo commit(java.lang.Runnable runnable, java.util.function.Predicate<java.lang.Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException
- Throws:
ConcurrentAccessException
CommitException
- Since:
- 4.9
-
commit
CDOCommitInfo commit(java.lang.Runnable runnable, int attempts, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException
- Throws:
ConcurrentAccessException
CommitException
- Since:
- 4.8
-
options
CDOTransaction.Options options()
Description copied from interface:CDOCommonView
Returns theoptions
of this view.- Specified by:
options
in interfaceCDOCommonView
- Specified by:
options
in interfaceCDOView
- Specified by:
options
in interfaceorg.eclipse.net4j.util.options.IOptionsContainer
-
-