Class CDOPushTransaction
- All Implemented Interfaces:
AutoCloseable,IAdaptable,CDOBranchPoint,CDOBranchProvider,CDOCommonTransaction,CDOCommonView,CDOChangeSetDataProvider,CDOCommitHistory.Provider<CDOObject,,CDOObjectHistory> CDORevisionProvider,CDOTimeProvider,CDORollbackable,CDOTransaction,CDOUserTransaction,CDOUpdatable,CDOView,org.eclipse.net4j.util.collection.Closeable,org.eclipse.net4j.util.container.IContainer<CDOResourceNode>,org.eclipse.net4j.util.event.INotifier,org.eclipse.net4j.util.event.INotifier.INotifier2,org.eclipse.net4j.util.options.IOptionsContainer,org.eclipse.net4j.util.properties.IPropertiesContainer
transaction that persists changes to the object graph locally on commit and can later load
these changes and push them to the repository.- Since:
- 3.0
- Author:
- Eike Stepper
- No Extend
- This interface is not intended to be extended by clients.
- No Instantiate
- This class is not intended to be instantiated by clients.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.event.Notifier.CancelationNested classes/interfaces inherited from interface org.eclipse.emf.cdo.transaction.CDOTransaction
CDOTransaction.CommitResult<T>, CDOTransaction.OptionsNested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
org.eclipse.net4j.util.container.IContainer.Modifiable<E>, org.eclipse.net4j.util.container.IContainer.Persistable<E>, org.eclipse.net4j.util.container.IContainer.Persistence<E>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 -
Constructor Summary
ConstructorsConstructorDescriptionCDOPushTransaction(CDOTransaction delegate) Deprecated.CDOPushTransaction(CDOTransaction delegate, File file) Deprecated.CDOPushTransaction(CDOTransaction delegate, File file, boolean reconstructSavepoints) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(org.eclipse.net4j.util.event.IListener listener) Deprecated.voidaddObjectHandler(CDOObjectHandler handler) Deprecated.voidDeprecated.voidDeprecated.voidclose()Deprecated.commit()Deprecated.commit(Runnable runnable, int attempts, IProgressMonitor monitor) Deprecated.commit(Runnable runnable, Predicate<Long> retry, IProgressMonitor monitor) Deprecated.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) Deprecated.<T> CDOTransaction.CommitResult<T> commit(Callable<T> callable, Predicate<Long> retry, IProgressMonitor monitor) Deprecated.<T> CDOTransaction.CommitResult<T> commit(Callable<T> callable, org.eclipse.net4j.util.Predicate<Long> retry, IProgressMonitor monitor) Deprecated.commit(IProgressMonitor monitor) Deprecated.commitAndClose(IProgressMonitor monitor, boolean keepOpenAfterCommitProblem) Deprecated.compareRevisions(CDOBranchPoint source) Deprecated.createBinaryResource(String path) Deprecated.createQuery(String language, String queryString) Deprecated.createQuery(String language, String queryString, boolean considerDirtyState) Deprecated.createQuery(String language, String queryString, Object context) Deprecated.createQuery(String language, String queryString, Object context, boolean considerDirtyState) Deprecated.createResource(String path) Deprecated.createResourceFolder(String path) Deprecated.createResourceURI(String path) Deprecated.static FilecreateTempFile(CDOTransaction transaction) Deprecated.createTextResource(String path) Deprecated.voiddisableDurableLocking(boolean releaseLocks) Deprecated.Deprecated.enableDurableLocking(boolean enable) Deprecated.UseenableDurableLocking()instead ordisableDurableLocking(boolean), respectively.Deprecated.getAdapter(Class adapter) Deprecated.getBinaryResource(String path) Deprecated.Deprecated.Deprecated.Deprecated.getCommitProperty(String key) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.getFile()Deprecated.Deprecated.Deprecated.getHistory(CDOObject object) Deprecated.Deprecated.longDeprecated.Deprecated.longDeprecated.org.eclipse.net4j.util.event.IListener[]Deprecated.Deprecated.getLockStates(Collection<CDOID> ids) Deprecated.getLockStates(Collection<CDOID> ids, boolean loadOnDemand) Deprecated.getLockStatesOfObjects(Collection<? extends CDOObject> objects) Deprecated.Deprecated.Deprecated.Deprecated.<T extends EObject>
TgetObject(T objectFromDifferentView) Deprecated.Deprecated.getObjects(Collection<CDOID> ids) Deprecated.Deprecated.getOrCreateResource(String path) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.getResource(String path) Deprecated.getResource(String path, boolean loadOnDemand) Deprecated.getResourceFolder(String path) Deprecated.getResourceNode(String path) Deprecated.Deprecated.getRevision(CDOID id) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.intDeprecated.getTextResource(String path) Deprecated.longDeprecated.Deprecated.Deprecated.Deprecated.Deprecated.getURI()Deprecated.Deprecated.intDeprecated.Deprecated.Deprecated.booleanDeprecated.booleanDeprecated.booleanhasResource(String path) Deprecated.importChanges(InputStream in, boolean reconstructSavepoints) Deprecated.booleanisClosed()Deprecated.booleanisDirty()Deprecated.booleanDeprecated.booleanisEmpty()Deprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.booleanDeprecated.voidlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout) Deprecated.voidlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout, boolean recursive) Deprecated.merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOBranchPoint targetBase, CDOMerger merger) Deprecated.merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOMerger merger) Deprecated.merge(CDOBranchPoint source, CDOMerger merger) Deprecated.Deprecated.Deprecated.options()Deprecated.Deprecated.voidpush()Deprecated.voidpush(IProgressMonitor progressMonitor) Deprecated.queryInstances(EClass type) Deprecated.<T extends EObject>
org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type) Deprecated.<T extends EObject>
org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type, boolean exact) Deprecated.queryResources(CDOResourceFolder folder, String name, boolean exactMatch) Deprecated.org.eclipse.net4j.util.collection.CloseableIterator<CDOResourceNode> queryResourcesAsync(CDOResourceFolder folder, String name, boolean exactMatch) Deprecated.queryXRefs(Set<CDOObject> targetObjects, EReference... sourceReferences) Deprecated.queryXRefs(CDOObject targetObject, EReference... sourceReferences) Deprecated.org.eclipse.net4j.util.collection.CloseableIterator<CDOObjectReference> queryXRefsAsync(Set<CDOObject> targetObjects, EReference... sourceReferences) Deprecated.voidrefreshLockStates(Consumer<CDOLockState> consumer) Deprecated.intDeprecated.voidremoveListener(org.eclipse.net4j.util.event.IListener listener) Deprecated.voidremoveObjectHandler(CDOObjectHandler handler) Deprecated.voidDeprecated.voidDeprecated.revertTo(CDOBranchPoint branchPoint) Deprecated.voidrollback()Deprecated.booleanrunAfterUpdate(long updateTime, Runnable runnable) Deprecated.booleanDeprecated.booleansetBranch(CDOBranch branch, IProgressMonitor monitor) Deprecated.booleansetBranchPoint(CDOBranch branch, long timeStamp) Deprecated.booleansetBranchPoint(CDOBranch branch, long timeStamp, IProgressMonitor monitor) Deprecated.booleansetBranchPoint(CDOBranchPoint branchPoint) Deprecated.booleansetBranchPoint(CDOBranchPoint branchPoint, IProgressMonitor monitor) Deprecated.voidsetCommitComment(String comment) Deprecated.setCommitProperty(String key, String value) Deprecated.voidsetCommittables(Set<? extends EObject> committables) Deprecated.protected voidsetDirty(boolean dirty) Deprecated.voidsetResourcePathCache(Map<String, CDOID> resourcePathCache) Deprecated.Deprecated.booleansetTimeStamp(long timeStamp) Deprecated.booleansetTimeStamp(long timeStamp, IProgressMonitor monitor) Deprecated.org.eclipse.net4j.util.concurrent.CriticalSectionsync()Deprecated.voidDeprecated.<V> VDeprecated.toString()Deprecated.voidDeprecated.voidunlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType) Deprecated.voidunlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, boolean recursive) Deprecated.voidwaitForUpdate(long updateTime) Deprecated.booleanwaitForUpdate(long updateTime, long timeoutMillis) Deprecated.Methods inherited from class org.eclipse.net4j.util.event.Notifier
addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getNotificationService, hasListener, lastListenerRemoved, listenerAdded, listenerRemoved
-
Constructor Details
-
CDOPushTransaction
Deprecated.- Throws:
IOException
-
CDOPushTransaction
Deprecated.- Throws:
IOException
-
CDOPushTransaction
@Deprecated public CDOPushTransaction(CDOTransaction delegate, File file, boolean reconstructSavepoints) throws IOException Deprecated.- Throws:
IOException
-
-
Method Details
-
getDelegate
Deprecated. -
getFile
Deprecated. -
properties
Deprecated.- Specified by:
propertiesin interfaceorg.eclipse.net4j.util.properties.IPropertiesContainer- Since:
- 4.4
-
isDirty
Deprecated.Description copied from interface:CDOTransactionReturnstrueif this transaction is not closed and contains uncommitted changes,falseotherwise.- Specified by:
isDirtyin interfaceCDOTransaction- Specified by:
isDirtyin interfaceCDOView- See Also:
-
setDirty
Deprecated. -
commit
Deprecated.Description copied from interface:CDOUserTransactionSame ascommit(null).- Specified by:
commitin interfaceCDOUserTransaction- Throws:
CommitException
-
commit
Deprecated.Description copied from interface:CDOUserTransactionCommits the modifications of this transaction to the repository and returns acommit infoobject if successful.Various kinds of problems can cause the commit to fail and not all of them can be avoided by acquiring pessimistic
lockson the modified objects. In particular you must expect and handlecontainment cycle exceptions. The following example shows how write robust transactions:CDOTransaction transaction = null; try { transaction = session.openTransaction(); for (;;) { transaction.getViewLock().lock(); try { CDOResource resource = transaction.getResource("/stock/resource1"); // Modify the model here... transaction.commit(); break; } catch (ConcurrentAccessException ex) { transaction.rollback(); } catch (CommitException ex) { throw ex.wrap(); } finally { transaction.getViewLock().unlock(); } } } finally { if (transaction != null) { transaction.close(); } }Note that the transaction stays functional after a any call to thecommit()methods. If the transaction is not closed after a commit it can be used to apply additional modifications to the model.- Specified by:
commitin interfaceCDOUserTransaction- Throws:
CommitException
-
commit
@Deprecated public <T> CDOTransaction.CommitResult<T> commit(Callable<T> callable, org.eclipse.net4j.util.Predicate<Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, Exception Deprecated.- Specified by:
commitin interfaceCDOTransaction- Throws:
ConcurrentAccessExceptionCommitExceptionException
-
commit
@Deprecated public <T> CDOTransaction.CommitResult<T> commit(Callable<T> callable, Predicate<Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, Exception Deprecated.- Specified by:
commitin interfaceCDOTransaction- Throws:
ConcurrentAccessExceptionCommitExceptionException
-
commit
@Deprecated public <T> CDOTransaction.CommitResult<T> commit(Callable<T> callable, int attempts, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, Exception Deprecated.- Specified by:
commitin interfaceCDOTransaction- Throws:
ConcurrentAccessExceptionCommitExceptionException
-
commit
@Deprecated public CDOCommitInfo commit(Runnable runnable, org.eclipse.net4j.util.Predicate<Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException Deprecated.- Specified by:
commitin interfaceCDOTransaction- Throws:
ConcurrentAccessExceptionCommitException
-
commit
@Deprecated public CDOCommitInfo commit(Runnable runnable, Predicate<Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException Deprecated.- Specified by:
commitin interfaceCDOTransaction- Throws:
ConcurrentAccessExceptionCommitException
-
commit
@Deprecated public CDOCommitInfo commit(Runnable runnable, int attempts, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException Deprecated.- Specified by:
commitin interfaceCDOTransaction- Throws:
ConcurrentAccessExceptionCommitException
-
commitAndClose
@Deprecated public CDOCommitInfo commitAndClose(IProgressMonitor monitor, boolean keepOpenAfterCommitProblem) throws CommitException Deprecated.- Specified by:
commitAndClosein interfaceCDOTransaction- Throws:
CommitException
-
rollback
Deprecated.Description copied from interface:CDOUserTransactionRolls back all uncommitted changes in this transaction.- Specified by:
rollbackin interfaceCDORollbackable- Specified by:
rollbackin interfaceCDOUserTransaction
-
push
Deprecated.- Throws:
CommitException
-
push
Deprecated.- Throws:
CommitException
-
exportChanges
Deprecated.- Specified by:
exportChangesin interfaceCDOTransaction- Throws:
IOException
-
importChanges
@Deprecated public CDOSavepoint[] importChanges(InputStream in, boolean reconstructSavepoints) throws IOException Deprecated.- Specified by:
importChangesin interfaceCDOTransaction- Throws:
IOException
-
getLastCommitTime
Deprecated.- Specified by:
getLastCommitTimein interfaceCDOTransaction
-
addListener
Deprecated.- Specified by:
addListenerin interfaceorg.eclipse.net4j.util.event.INotifier- Overrides:
addListenerin classorg.eclipse.net4j.util.event.Notifier
-
removeListener
Deprecated.- Specified by:
removeListenerin interfaceorg.eclipse.net4j.util.event.INotifier- Overrides:
removeListenerin classorg.eclipse.net4j.util.event.Notifier
-
hasListeners
Deprecated.- Specified by:
hasListenersin interfaceorg.eclipse.net4j.util.event.INotifier- Overrides:
hasListenersin classorg.eclipse.net4j.util.event.Notifier
-
getListeners
Deprecated.- Specified by:
getListenersin interfaceorg.eclipse.net4j.util.event.INotifier- Overrides:
getListenersin classorg.eclipse.net4j.util.event.Notifier
-
addObjectHandler
Deprecated.- Specified by:
addObjectHandlerin interfaceCDOView
-
addRegistrationHandler
Deprecated.- Specified by:
addRegistrationHandlerin interfaceCDOView- Since:
- 4.6
-
addTransactionHandler
Deprecated.- Specified by:
addTransactionHandlerin interfaceCDOTransaction- Since:
- 4.0
-
close
Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceorg.eclipse.net4j.util.collection.Closeable
-
createQuery
Deprecated.Description copied from interface:CDOViewSame ascreateQuery(language, queryString, null).- Specified by:
createQueryin interfaceCDOView- See Also:
-
createQuery
Deprecated.- Specified by:
createQueryin interfaceCDOView- Since:
- 4.0
-
createQuery
@Deprecated public CDOQuery createQuery(String language, String queryString, boolean considerDirtyState) Deprecated.- Specified by:
createQueryin interfaceCDOTransaction- Since:
- 4.0
-
createQuery
@Deprecated public CDOQuery createQuery(String language, String queryString, Object context, boolean considerDirtyState) Deprecated.- Specified by:
createQueryin interfaceCDOTransaction- Since:
- 4.0
-
createResourceFolder
Deprecated.- Specified by:
createResourceFolderin interfaceCDOTransaction- Since:
- 4.0
-
createResource
Deprecated.- Specified by:
createResourcein interfaceCDOTransaction- See Also:
-
isLegacyModeEnabled
Deprecated.- Specified by:
isLegacyModeEnabledin interfaceCDOView- See Also:
-
getLastUpdateTime
Deprecated.Description copied from interface:CDOUpdatableReturns the time stamp of the last commit operation. May not be accurate ifpassive updatesare disabled.- Specified by:
getLastUpdateTimein interfaceCDOUpdatable
-
waitForUpdate
Deprecated.Description copied from interface:CDOUpdatableBlocks the calling thread until a commit operation with the given time stamp (or higher) has occurred.- Specified by:
waitForUpdatein interfaceCDOUpdatable- Parameters:
updateTime- the time stamp of the update to wait for in milliseconds since Unix epoch.
-
waitForUpdate
Deprecated.Description copied from interface:CDOUpdatableBlocks the calling thread until a commit operation with the given time stamp (or higher) has occurred or the given timeout has expired.- Specified by:
waitForUpdatein interfaceCDOUpdatable- Parameters:
updateTime- the time stamp of the update to wait for in milliseconds since Unix epoch.timeoutMillis- the maximum number of milliseconds to wait for the update to occur, orCDOUpdatable.NO_TIMEOUTto wait indefinitely.- Returns:
trueif the specified commit operation has occurred within the given timeout period,falseotherwise.
-
runAfterUpdate
Deprecated.- Specified by:
runAfterUpdatein interfaceCDOUpdatable- Since:
- 4.3
-
getConflicts
Deprecated.Description copied from interface:CDOTransactionReturns the set of objects that are conflicting with remote modifications or an empty set ifCDOTransaction.hasConflict()returnsfalse.- Specified by:
getConflictsin interfaceCDOTransaction
-
getChangeSetData
Deprecated.- Specified by:
getChangeSetDatain interfaceCDOChangeSetDataProvider- Since:
- 4.0
-
getDetachedObjects
Deprecated.- Specified by:
getDetachedObjectsin interfaceCDOTransaction
-
getDirtyObjects
Deprecated.- Specified by:
getDirtyObjectsin interfaceCDOTransaction
-
getRevision
Deprecated.- Specified by:
getRevisionin interfaceCDORevisionProvider- Since:
- 4.0
-
getFirstSavepoint
Deprecated.- Specified by:
getFirstSavepointin interfaceCDOTransaction- Since:
- 4.1
-
getLastSavepoint
Deprecated.Description copied from interface:CDOUserTransactionReturns the most recently created savepoint.- Specified by:
getLastSavepointin interfaceCDOTransaction- Specified by:
getLastSavepointin interfaceCDOUserTransaction- Returns:
- the last savepoint, or
nullif none exists.
-
isInvalidationRunnerActive
Deprecated.- Specified by:
isInvalidationRunnerActivein interfaceCDOView- Since:
- 4.0
-
isInvalidating
Deprecated.- Specified by:
isInvalidatingin interfaceCDOView- Since:
- 4.7
-
getNewObjects
Deprecated.- Specified by:
getNewObjectsin interfaceCDOTransaction
-
getObjects
Deprecated.Description copied from interface:CDOViewReturns the objects with the given CDOIDs.If objects are missing from the local cache they are loaded from the server in one round-trip.
- Specified by:
getObjectsin interfaceCDOView- Parameters:
ids- the collection of CDOIDs that identify the CDOObjects to return.- Returns:
- a map that contains the CDOObjects with the given CDOIDs.
- Since:
- 4.13
-
getObject
Deprecated.Description copied from interface:CDOViewReturns the object for the given CDOID. -
getObject
Deprecated.Description copied from interface:CDOViewReturns the object for the given CDOID.Same as
getObject(id, true). -
getObject
Deprecated.Description copied from interface:CDOViewTakes an object from a (possibly) different view and contextifies it for the usage with this view.- If the given object is contained in this view it is returned unmodified.
- If the given object can not be cast to
CDOObjectit is returned unmodified. - If the view of the given object is contained in a different session an
IllegalArgumentExceptionis thrown. - If
nullis passednullis returned.
-
getObjectHandlers
Deprecated.- Specified by:
getObjectHandlersin interfaceCDOView
-
getRegistrationHandlers
Deprecated.- Specified by:
getRegistrationHandlersin interfaceCDOView- Since:
- 4.6
-
getOrCreateResource
Deprecated.- Specified by:
getOrCreateResourcein interfaceCDOTransaction
-
getOrCreateResourceFolder
Deprecated.- Specified by:
getOrCreateResourceFolderin interfaceCDOTransaction- Since:
- 4.0
-
getResource
@Deprecated public CDOResource getResource(String path, boolean loadOnDemand) throws CDOResourceNodeNotFoundException Deprecated.- Specified by:
getResourcein interfaceCDOView- Throws:
CDOResourceNodeNotFoundException- See Also:
-
getResource
Deprecated.Description copied from interface:CDOViewSame asgetResource(String, true).- Specified by:
getResourcein interfaceCDOView- Throws:
CDOResourceNodeNotFoundException- See Also:
-
getResourceNode
@Deprecated public CDOResourceNode getResourceNode(String path) throws CDOResourceNodeNotFoundException Deprecated.Description copied from interface:CDOViewReturns the resource node with the given path.- Specified by:
getResourceNodein interfaceCDOView- Returns:
- never
null. - Throws:
CDOResourceNodeNotFoundException
-
createTextResource
Deprecated.- Specified by:
createTextResourcein interfaceCDOTransaction- Since:
- 4.2
-
getOrCreateTextResource
Deprecated.- Specified by:
getOrCreateTextResourcein interfaceCDOTransaction- Since:
- 4.2
-
createBinaryResource
Deprecated.- Specified by:
createBinaryResourcein interfaceCDOTransaction- Since:
- 4.2
-
getOrCreateBinaryResource
Deprecated.- Specified by:
getOrCreateBinaryResourcein interfaceCDOTransaction- Since:
- 4.2
-
getTextResource
@Deprecated public CDOTextResource getTextResource(String path) throws CDOResourceNodeNotFoundException Deprecated.- Specified by:
getTextResourcein interfaceCDOView- Throws:
CDOResourceNodeNotFoundException- Since:
- 4.2
-
getBinaryResource
@Deprecated public CDOBinaryResource getBinaryResource(String path) throws CDOResourceNodeNotFoundException Deprecated.- Specified by:
getBinaryResourcein interfaceCDOView- Throws:
CDOResourceNodeNotFoundException- Since:
- 4.2
-
getResourceFolder
@Deprecated public CDOResourceFolder getResourceFolder(String path) throws CDOResourceNodeNotFoundException Deprecated.- Specified by:
getResourceFolderin interfaceCDOView- Throws:
CDOResourceNodeNotFoundException- Since:
- 4.2
-
setResourcePathCache
Deprecated.Description copied from interface:CDOViewSets the newmapto be used as a cache for variousget*Resource*(String path)methods.Can be used to reset/clear the resource path cache by passing a
new HashMap<String, CDOID>(). Smarter maps could implement a LRU eviction policy to limit the map capacity. Passingnulldisables resource path caching.The default value is
new HashMap<String, CDOID>().- Specified by:
setResourcePathCachein interfaceCDOView- Since:
- 4.2
- See Also:
-
getResourceSet
Deprecated.Description copied from interface:CDOViewReturns theresource setthis view is associated with.Same as calling getViewSet().getResourceSet().
- Specified by:
getResourceSetin interfaceCDOView- See Also:
-
getRevisionDeltas
Deprecated.- Specified by:
getRevisionDeltasin interfaceCDOTransaction
-
getRootResource
Deprecated.Description copied from interface:CDOViewReturns the root resource of the repository.The root resource is a special resource with only
CDOResourceNodesin its contents list. You can use it as the main entry into the new resource and folder structure.- Specified by:
getRootResourcein interfaceCDOView
-
getSession
Deprecated.Description copied from interface:CDOViewReturns thesessionthis view was opened by.- Specified by:
getSessionin interfaceCDOCommonView- Specified by:
getSessionin interfaceCDOView- Returns:
- The session this view was opened by, or
nullif this view is closed. - See Also:
-
getProvider
Deprecated.Description copied from interface:CDOViewReturns theproviderthat has opened this view.- Specified by:
getProviderin interfaceCDOView- Since:
- 4.4
-
createResourceURI
Deprecated.Description copied from interface:CDOViewReturns aURIthat can be used inResourceSet.getResource(URI, boolean)to load the resource with the specified path.- Specified by:
createResourceURIin interfaceCDOView- Since:
- 4.4
-
getTimeStamp
Deprecated.Description copied from interface:CDOBranchPointReturns the time stamp of this branch point, or the fixed special time stampunspecifiedif this branch point marks theheadof a branch.- Specified by:
getTimeStampin interfaceCDOBranchPoint- Specified by:
getTimeStampin interfaceCDOTimeProvider
-
getDurableLockingID
Deprecated.- Specified by:
getDurableLockingIDin interfaceCDOCommonView- Since:
- 4.0
-
getTransactionHandlers
Deprecated.- Specified by:
getTransactionHandlersin interfaceCDOTransaction
-
getTransactionHandlers1
Deprecated.- Specified by:
getTransactionHandlers1in interfaceCDOTransaction- Since:
- 4.0
-
getTransactionHandlers2
Deprecated.- Specified by:
getTransactionHandlers2in interfaceCDOTransaction- Since:
- 4.0
-
getSessionID
Deprecated.- Specified by:
getSessionIDin interfaceCDOCommonView- Since:
- 4.1
-
isDurableView
Deprecated.- Specified by:
isDurableViewin interfaceCDOCommonView- Since:
- 4.1
-
getLockOwner
Deprecated.- Specified by:
getLockOwnerin interfaceCDOCommonView- Since:
- 4.15
-
getURI
Deprecated. -
getViewID
Deprecated.- Specified by:
getViewIDin interfaceCDOCommonView
-
getViewSet
Deprecated.Description copied from interface:CDOViewReturns theview setthis view is associated with.- Specified by:
getViewSetin interfaceCDOView- Returns:
- The view set this view is associated with, never
null. - See Also:
-
sync
Deprecated.Description copied from interface:CDOViewReturns acritical sectionthat can be used to execute a block of code that needs to be synchronized with the internal operations of this view and itsobjects.Here is an example:
CDOView view = ...; CriticalSection sync = view.sync(); MyResult result = sync.call(() -> { // Access the view and its objects safely here. CDOObject object1 = view.getObject(id1); CDOObject object2 = view.getObject(id2); CDOObject object3 = view.getObject(id3); ... return new MyResult(...); });The critical section ensures that no invalidation or other internal operation of the view can occur while the block of code is executed. This is particularly important if the block of code accesses the view orobjectsof the view multiple times, because these objects can beinvalidatedby network threads at any time in between these accesses otherwise. This can lead to wrong computation results in the block of code being executed.Note that single accesses to the view or its objects are always safe, even without using the critical section.
There are some other useful methods in CriticalSection that can be used to execute a block of code, such as
run(Runnable)orsupply(Supplier).By default the critical section uses the monitor lock of this view to synchronize. If you need a different locking strategy you can override this by calling
CDOUtil.setNextViewLock(Lock)before opening the view.In particular you can use a
DelegableReentrantLock, which allows to delegate the lock ownership to a different thread. This is useful in scenarios where you need to hold the lock while waiting for an asynchronous operation to complete in a different thread.A typical example is the Display.syncExec() method in SWT/JFace UI applications. With the default locking strategy this can lead to deadlocks:
- Thread A (not the UI thread) holds the view lock and calls
Display.syncExec()to execute some code in the UI thread. - The Runnable passed to syncExec() is scheduled for execution in the UI thread. Thread A waits for the Runnable to complete.
- The UI thread executes the Runnable, which tries to access the view or an object of the view. This requires the view lock, which is already held by thread A.
- Deadlock: Thread A waits for the Runnable to complete and the UI thread waits for the view lock to be released.
Note that, in this scenario, Thread A is holding the view lock while waiting for the Runnable to complete. This is kind of an anti-pattern, because it blocks other threads from accessing the view for an indeterminate amount of time. In addition, it is not necessary to hold the view lock while waiting for the Runnable to complete, because Thread A can not access the view in that time.
A
DelegableReentrantLockcan be used to avoid the deadlock. It uses so called lock delegation to temporarily transfer the ownership of the lock to a different thread. In the scenario described above, Thread A can delegate the lock ownership to the UI thread while waiting for the Runnable to complete. When the Runnable completes, the lock ownership is transferred back to Thread A. This way, the UI thread can access the view while executing the Runnable and no deadlock occurs.DelegableReentrantLockusesDelegableReentrantLock.DelegateDetectors to determine whether the current thread is allowed to delegate the lock ownership to a different thread. ADelegateDetectorcan be registered with the lock by callingDelegableReentrantLock.addDelegateDetector(DelegateDetector). Theorg.eclipse.net4j.util.uiplugin provides aDisplayDelegateDetectorfor the SWT/JFace UI thread that detects calls toDisplay.syncExec(). - Thread A (not the UI thread) holds the view lock and calls
-
getViewLock
Deprecated.- Specified by:
getViewLockin interfaceCDOView- Since:
- 4.5
-
syncExec
Deprecated. -
syncExec
Deprecated. -
hasConflict
Deprecated.Description copied from interface:CDOTransactionReturnstrueif this transaction contains local modifications that are conflicting with remote modifications,falseotherwise.- Specified by:
hasConflictin interfaceCDOTransaction- Specified by:
hasConflictin interfaceCDOView- See Also:
-
hasResource
Deprecated.Description copied from interface:CDOViewReturnstrueif a resource with the given path exists in the repository,false. Applies tofile resources, as well.- Specified by:
hasResourcein interfaceCDOView- See Also:
-
isClosed
Deprecated.- Specified by:
isClosedin interfaceorg.eclipse.net4j.util.collection.Closeable
-
isObjectRegistered
Deprecated.Description copied from interface:CDOView- Specified by:
isObjectRegisteredin interfaceCDOView
-
refreshLockStates
Deprecated.Description copied from interface:CDOViewRefreshes thelock statesof thisviewwith the latest states from the repository. If a lock state consumer is passed it is called for each resulting new lock state.- Specified by:
refreshLockStatesin interfaceCDOView- Since:
- 4.12
-
getLockStates
Deprecated.Description copied from interface:CDOViewGet an array oflock statescorresponding to the specified collection ofids. If the collection ofidsis empty,lock statesof all objects are returned.- Specified by:
getLockStatesin interfaceCDOView- Since:
- 4.6
-
getLockStates
Deprecated.Description copied from interface:CDOViewGet an array oflock statescorresponding to the specified collection ofids. If the collection ofidsis empty,lock statesof all objects are returned.- Specified by:
getLockStatesin interfaceCDOView
-
getLockStatesOfObjects
Deprecated.Description copied from interface:CDOViewGet an array oflock statescorresponding to the specified collection ofobjects. If the collection ofobjectsis empty,lock statesof all locked objects are returned.- Specified by:
getLockStatesOfObjectsin interfaceCDOView- Since:
- 4.6
-
lockObjects
@Deprecated public void lockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout) throws InterruptedException Deprecated.Description copied from interface:CDOViewLocks the given objects. Once the objects are locked, they will not be changed remotely or go in conflict state.- Specified by:
lockObjectsin interfaceCDOView- Throws:
InterruptedException
-
lockObjects
@Deprecated public void lockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout, boolean recursive) throws InterruptedException Deprecated.- Specified by:
lockObjectsin interfaceCDOView- Throws:
InterruptedException
-
options
Deprecated.Description copied from interface:CDOCommonViewReturns theoptionsof this view.- Specified by:
optionsin interfaceCDOCommonView- Specified by:
optionsin interfaceCDOTransaction- Specified by:
optionsin interfaceCDOView- Specified by:
optionsin interfaceorg.eclipse.net4j.util.options.IOptionsContainer
-
queryResources
@Deprecated public List<CDOResourceNode> queryResources(CDOResourceFolder folder, String name, boolean exactMatch) Deprecated.Description copied from interface:CDOViewReturns a list of the resources in the given folder with a name equal to or starting with the value of the name parameter.- Specified by:
queryResourcesin interfaceCDOView- Parameters:
folder- The folder to search in, ornullfor top level resource nodes.name- the name or prefix of the resource nodes to return.exactMatch-trueif the complete name of the resource must match,falseif only a common prefix of the name must match.
-
queryResourcesAsync
@Deprecated public org.eclipse.net4j.util.collection.CloseableIterator<CDOResourceNode> queryResourcesAsync(CDOResourceFolder folder, String name, boolean exactMatch) Deprecated.Description copied from interface:CDOViewReturns an iterator over the resources in the given folder with a name equal to or starting with the value of the name parameter. The underlying query will be executed asynchronously.- Specified by:
queryResourcesAsyncin interfaceCDOView- Parameters:
folder- The folder to search in, ornullfor top level resource nodes.name- the name or prefix of the resource nodes to return.exactMatch-trueif the complete name of the resource must match,falseif only a common prefix of the name must match.
-
queryInstances
Deprecated.Description copied from interface:CDOViewReturns a list of the instances of the given type.- Specified by:
queryInstancesin interfaceCDOView- Since:
- 4.3
-
queryInstancesAsync
@Deprecated public <T extends EObject> org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type) Deprecated.Description copied from interface:CDOViewReturns an iterator over the instances of the given type. The underlying query will be executed asynchronously.- Specified by:
queryInstancesAsyncin interfaceCDOView- Since:
- 4.3
-
queryInstancesAsync
@Deprecated public <T extends EObject> org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type, boolean exact) Deprecated.Description copied from interface:CDOViewReturns an iterator over the instances of the given type. The underlying query will be executed asynchronously.- Specified by:
queryInstancesAsyncin interfaceCDOView- Since:
- 4.6
-
queryXRefs
@Deprecated public List<CDOObjectReference> queryXRefs(CDOObject targetObject, EReference... sourceReferences) Deprecated.Description copied from interface:CDOViewReturns a list ofobject referencesthat represent the cross references to the specified target object.- Specified by:
queryXRefsin interfaceCDOView- Parameters:
targetObject- The target object that referencing objects are requested for. An external target object can be used with the help ofCDOUtil.wrapExternalObject().sourceReferences- The reference features that referencing objects are requested for, or an empty array if all reference features are to be used in the request.- Since:
- 4.0
- See Also:
-
queryXRefs
@Deprecated public List<CDOObjectReference> queryXRefs(Set<CDOObject> targetObjects, EReference... sourceReferences) Deprecated.Description copied from interface:CDOViewReturns a list ofobject referencesthat represent the cross references to the specified target objects.- Specified by:
queryXRefsin interfaceCDOView- Parameters:
targetObjects- The set of target objects that referencing objects are requested for. External target objects can be used with the help ofCDOUtil.wrapExternalObject().sourceReferences- The reference features that referencing objects are requested for, or an empty array if all reference features are to be used in the request.- See Also:
-
queryXRefsAsync
@Deprecated public org.eclipse.net4j.util.collection.CloseableIterator<CDOObjectReference> queryXRefsAsync(Set<CDOObject> targetObjects, EReference... sourceReferences) Deprecated.Description copied from interface:CDOViewReturns an iterator over theobject referencesthat represent the cross references to the specified target objects. The underlying query will be executed asynchronously.- Specified by:
queryXRefsAsyncin interfaceCDOView- Parameters:
targetObjects- The set of target objects that referencing objects are requested for. External target objects can be used with the help ofCDOUtil.wrapExternalObject().sourceReferences- The reference features that referencing objects are requested for, or an empty array if all reference features are to be used in the request.- See Also:
-
reload
Deprecated.Description copied from interface:CDOViewReloads the givenobjectsfrom the repository. -
removeObjectHandler
Deprecated.- Specified by:
removeObjectHandlerin interfaceCDOView
-
removeRegistrationHandler
Deprecated.- Specified by:
removeRegistrationHandlerin interfaceCDOView- Since:
- 4.6
-
removeTransactionHandler
Deprecated.- Specified by:
removeTransactionHandlerin interfaceCDOTransaction- Since:
- 4.0
-
revertTo
Deprecated.- Specified by:
revertToin interfaceCDOTransaction- Since:
- 4.15
-
merge
Deprecated.Description copied from interface:CDOTransactionMerges 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.- Specified by:
mergein interfaceCDOTransaction- Since:
- 4.6
- See Also:
-
merge
Deprecated.Description copied from interface:CDOTransactionMerges the changes from the given source point into this transaction and possibly considers previous merges from thatbranchby inspecting themerge sourceinformation of thecommit history.- Specified by:
mergein interfaceCDOTransaction
-
merge
@Deprecated public CDOChangeSetData merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOMerger merger) Deprecated.Description copied from interface:CDOTransactionMerges 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:
- Specified by:
mergein interfaceCDOTransaction- Since:
- 4.0
-
merge
@Deprecated public CDOChangeSetData merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOBranchPoint targetBase, CDOMerger merger) Deprecated.Description copied from interface:CDOTransactionMerges 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".
- Specified by:
mergein interfaceCDOTransaction- Since:
- 4.6
- See Also:
-
compareRevisions
Deprecated.- Specified by:
compareRevisionsin interfaceCDOView- Since:
- 4.0
-
getHistory
Deprecated.- Specified by:
getHistoryin interfaceCDOCommitHistory.Provider<CDOObject,CDOObjectHistory> - Since:
- 4.2
-
getHistory
Deprecated.- Specified by:
getHistoryin interfaceCDOCommitHistory.Provider<CDOObject,CDOObjectHistory> - Since:
- 4.2
-
setSavepoint
Deprecated.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 interfaceCDOTransaction- Specified by:
setSavepointin interfaceCDOUserTransaction
-
unlockObjects
Deprecated.Description copied from interface:CDOViewUnlocks all locked objects of this view.- Specified by:
unlockObjectsin interfaceCDOView
-
unlockObjects
@Deprecated public void unlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType) Deprecated.Description copied from interface:CDOViewUnlocks the given locked objects of this view.- Specified by:
unlockObjectsin interfaceCDOView
-
unlockObjects
@Deprecated public void unlockObjects(Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, boolean recursive) Deprecated.- Specified by:
unlockObjectsin interfaceCDOView
-
enableDurableLocking
Deprecated.UseenableDurableLocking()instead ordisableDurableLocking(boolean), respectively.- Specified by:
enableDurableLockingin interfaceCDOView- Since:
- 4.0
-
enableDurableLocking
Deprecated.Description copied from interface:CDOViewEnables the storage of all information that's needed toreopenthis view at a later point in time. This information includes thebranch point, the user ID of thesession, whether it's a read-only view or atransactionand all the locks that are acquired or will be acquired while durable locking is enabled.- Specified by:
enableDurableLockingin interfaceCDOView- Since:
- 4.1
- See Also:
-
disableDurableLocking
Deprecated.Description copied from interface:CDOViewDisables the storage of all information that's needed toreopenthis view at a later point in time. If such information is stored when this method is called it is removed. Note that locks acquired by this view are only released iftrueis passed to thereleaseLocksparameter.- Specified by:
disableDurableLockingin interfaceCDOView- Since:
- 4.1
- See Also:
-
isReadOnly
Deprecated.- Specified by:
isReadOnlyin interfaceCDOCommonView
-
isHistorical
Deprecated.- Specified by:
isHistoricalin interfaceCDOCommonView- Since:
- 4.5
-
getBranch
Deprecated.Description copied from interface:CDOBranchPointReturns the branch of this branch point, ornullif this branch point is thebaseof themain branch.- Specified by:
getBranchin interfaceCDOBranchPoint- Specified by:
getBranchin interfaceCDOBranchProvider
-
setBranchPoint
Deprecated.Description copied from interface:CDOViewSets thebranchand the point in (repository) time this view should refer to.Objectsprovided by this view will bevalidat this time. The special valueUNSPECIFIED_DATEdenotes a "floating view" that always shows the latest state of the repository.- Specified by:
setBranchPointin interfaceCDOView- Returns:
trueif the branch point was changed,falseotherwise.
-
setBranchPoint
@Deprecated public boolean setBranchPoint(CDOBranch branch, long timeStamp, IProgressMonitor monitor) Deprecated.Description copied from interface:CDOViewSame asCDOView.setBranchPoint(CDOBranch, long)with aIProgressMonitor.- Specified by:
setBranchPointin interfaceCDOView- Since:
- 4.4
-
setBranchPoint
Deprecated.Description copied from interface:CDOViewSame as callingsetBranchPoint(branchPoint.getBranch(), branchPoint.getTimeStamp()).- Specified by:
setBranchPointin interfaceCDOView
-
setBranchPoint
Deprecated.Description copied from interface:CDOViewSame as callingCDOView.setBranchPoint(CDOBranchPoint)with aIProgressMonitor.- Specified by:
setBranchPointin interfaceCDOView- Since:
- 4.4
-
setBranch
Deprecated.Description copied from interface:CDOViewSame as callingsetBranchPoint(branch, getTimeStamp()). -
setBranch
Deprecated.Description copied from interface:CDOViewSame asCDOView.setBranch(CDOBranch)withIProgressMonitor. -
setTimeStamp
Deprecated.Description copied from interface:CDOViewSame as callingsetBranchPoint(getBranch(), timeStamp).- Specified by:
setTimeStampin interfaceCDOView
-
setTimeStamp
Deprecated.Description copied from interface:CDOViewSame asCDOView.setTimeStamp(long)withIProgressMonitor.- Specified by:
setTimeStampin interfaceCDOView- Since:
- 4.4
-
getURIHandler
Deprecated.- Specified by:
getURIHandlerin interfaceCDOView
-
getUnitManager
Deprecated.- Specified by:
getUnitManagerin interfaceCDOView- Since:
- 4.5
-
getCommitComment
Deprecated.Description copied from interface:CDOTransactionReturns the comment to be used in the next commit operation.- Specified by:
getCommitCommentin interfaceCDOTransaction- See Also:
-
setCommitComment
Deprecated.Description copied from interface:CDOTransactionSets the comment to be used in the next commit operation.- Specified by:
setCommitCommentin interfaceCDOTransaction- See Also:
-
getCommitProperty
Deprecated.- Specified by:
getCommitPropertyin interfaceCDOTransaction
-
setCommitProperty
Deprecated.- Specified by:
setCommitPropertyin interfaceCDOTransaction
-
setCommittables
Deprecated.- Specified by:
setCommittablesin interfaceCDOTransaction- Since:
- 4.0
-
getCommittables
Deprecated.- Specified by:
getCommittablesin interfaceCDOTransaction- Since:
- 4.0
-
isEmpty
Deprecated.- Specified by:
isEmptyin interfaceorg.eclipse.net4j.util.container.IContainer<CDOResourceNode>- Since:
- 4.2
-
getElements
Deprecated.- Specified by:
getElementsin interfaceorg.eclipse.net4j.util.container.IContainer<CDOResourceNode>- Since:
- 4.2
-
toString
Deprecated. -
openScope
Deprecated.Description copied from interface:CDOTransactionOpens a nested scope inside the current innermost scope, if any.The scope shares this transaction's view, object identities, object cache, resource set, dirty state, locks, and repository session. Its changes are immediately visible in this transaction. Scope completion does not persist changes; only this root transaction's repository commit does so.
- Specified by:
openScopein interfaceCDOTransaction- Returns:
- the newly opened scope.
-
getOutermostScope
Deprecated.Description copied from interface:CDOTransactionReturns the outermost currently open nested scope, ornullif no scope is open.- Specified by:
getOutermostScopein interfaceCDOTransaction- Returns:
- the outermost open scope, or
null.
-
getInnermostScope
Deprecated.Description copied from interface:CDOTransactionReturns the innermost currently open nested scope, ornullif no scope is open.- Specified by:
getInnermostScopein interfaceCDOTransaction- Returns:
- the innermost open scope, or
null.
-
getScopes
Deprecated.Description copied from interface:CDOTransactionReturns an immutable outermost-to-innermost snapshot of open scopes.The ordering is the scope completion order: only the last scope in the snapshot can be committed directly.
- Specified by:
getScopesin interfaceCDOTransaction- Returns:
- an immutable snapshot of the currently open scopes.
-
getAdapter
Deprecated.- Specified by:
getAdapterin interfaceIAdaptable- Since:
- 4.2
-
createTempFile
Deprecated.- Throws:
IOException
-
CDOFileTransaction.