Class CDOPushTransaction
- java.lang.Object
-
- org.eclipse.net4j.util.event.Notifier
-
- org.eclipse.emf.cdo.transaction.CDOPushTransaction
-
- All Implemented Interfaces:
IAdaptable
,CDOBranchPoint
,CDOBranchProvider
,CDOCommonTransaction
,CDOCommonView
,CDOChangeSetDataProvider
,CDOCommitHistory.Provider<CDOObject,CDOObjectHistory>
,CDOLockOwner
,CDORevisionProvider
,CDOTimeProvider
,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
public class CDOPushTransaction extends org.eclipse.net4j.util.event.Notifier implements CDOTransaction
Atransaction
that persists changes to the object graph locally on commit and can later load these changes and push them to therepository
.- 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 interface org.eclipse.emf.cdo.transaction.CDOTransaction
CDOTransaction.CommitResult<T>, CDOTransaction.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
-
-
Constructor Summary
Constructors Constructor Description CDOPushTransaction(CDOTransaction delegate)
CDOPushTransaction(CDOTransaction delegate, java.io.File file)
CDOPushTransaction(CDOTransaction delegate, java.io.File file, boolean reconstructSavepoints)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addListener(org.eclipse.net4j.util.event.IListener listener)
void
addObjectHandler(CDOObjectHandler handler)
void
addRegistrationHandler(CDORegistrationHandler handler)
void
addTransactionHandler(CDOTransactionHandlerBase handler)
void
close()
CDOCommitInfo
commit()
Same ascommit(null)
.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.CDOCommitInfo
commit(IProgressMonitor monitor)
Commits the modifications of this transaction to the repository and returns acommit info
object if successful.CDOChangeSetData
compareRevisions(CDOBranchPoint source)
CDOBinaryResource
createBinaryResource(java.lang.String path)
CDOQuery
createQuery(java.lang.String language, java.lang.String queryString)
Same ascreateQuery(language, queryString, null)
.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)
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)
URI
createResourceURI(java.lang.String path)
Returns aURI
that can be used inResourceSet.getResource(URI, boolean)
to load the resource with the specified path.static java.io.File
createTempFile(CDOTransaction transaction)
CDOTextResource
createTextResource(java.lang.String path)
void
disableDurableLocking(boolean releaseLocks)
Disables the storage of all information that's needed toreopen
this view at a later point in time.java.lang.String
enableDurableLocking()
Enables the storage of all information that's needed toreopen
this view at a later point in time.java.lang.String
enableDurableLocking(boolean enable)
Deprecated.UseenableDurableLocking()
instead ordisableDurableLocking(boolean)
, respectively.CDOSavepoint[]
exportChanges(java.io.OutputStream out)
java.lang.Object
getAdapter(java.lang.Class adapter)
CDOBinaryResource
getBinaryResource(java.lang.String path)
CDOBranch
getBranch()
Returns the branch of this branch point, ornull
if this branch point is thebase
of themain branch
.CDOChangeSetData
getChangeSetData()
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 ifCDOTransaction.hasConflict()
returnsfalse
.CDOTransaction
getDelegate()
java.util.Map<CDOID,CDOObject>
getDetachedObjects()
java.util.Map<CDOID,CDOObject>
getDirtyObjects()
java.lang.String
getDurableLockingID()
CDOResourceNode[]
getElements()
java.io.File
getFile()
CDOSavepoint
getFirstSavepoint()
CDOCommitHistory
getHistory()
CDOObjectHistory
getHistory(CDOObject object)
long
getLastCommitTime()
CDOSavepoint
getLastSavepoint()
long
getLastUpdateTime()
Returns the time stamp of the last commit operation.org.eclipse.net4j.util.event.IListener[]
getListeners()
CDOLockState[]
getLockStates(java.util.Collection<CDOID> ids)
Get an array oflock states
corresponding to the specified collection ofids
.CDOLockState[]
getLockStatesOfObjects(java.util.Collection<? extends CDOObject> objects)
Get an array oflock states
corresponding to the specified collection ofobjects
.java.util.Map<CDOID,CDOObject>
getNewObjects()
CDOObject
getObject(CDOID id)
Returns the object for the given CDOID.CDOObject
getObject(CDOID id, boolean loadOnDemand)
Returns the object for the given CDOID.<T extends EObject>
TgetObject(T objectFromDifferentView)
Takes an object from a (possibly) different view and contextifies it for the usage with this view.CDOObjectHandler[]
getObjectHandlers()
java.util.Map<CDOID,CDOObject>
getObjects(java.util.Collection<CDOID> ids)
Returns the objects with the given CDOIDs.CDOBinaryResource
getOrCreateBinaryResource(java.lang.String path)
CDOResource
getOrCreateResource(java.lang.String path)
CDOResourceFolder
getOrCreateResourceFolder(java.lang.String path)
CDOTextResource
getOrCreateTextResource(java.lang.String path)
CDOViewProvider
getProvider()
Returns theprovider
that has opened this view.CDORegistrationHandler[]
getRegistrationHandlers()
CDOResource
getResource(java.lang.String path)
Same asgetResource(String, true)
.CDOResource
getResource(java.lang.String path, boolean loadOnDemand)
CDOResourceFolder
getResourceFolder(java.lang.String path)
CDOResourceNode
getResourceNode(java.lang.String path)
Returns the resource node with the given path.ResourceSet
getResourceSet()
Returns theresource set
this view is associated with.CDORevision
getRevision(CDOID id)
java.util.Map<CDOID,CDORevisionDelta>
getRevisionDeltas()
CDOResource
getRootResource()
Returns the root resource of the repository.CDOSession
getSession()
Returns thesession
this view was opened by.int
getSessionID()
CDOTextResource
getTextResource(java.lang.String path)
long
getTimeStamp()
Returns the time stamp of this branch point, or the fixed special time stampunspecified
if this branch point marks thehead
of a branch.CDOTransactionHandler[]
getTransactionHandlers()
CDOTransactionHandler1[]
getTransactionHandlers1()
CDOTransactionHandler2[]
getTransactionHandlers2()
CDOUnitManager
getUnitManager()
URIHandler
getURIHandler()
int
getViewID()
java.util.concurrent.locks.Lock
getViewLock()
CDOViewSet
getViewSet()
Returns theview set
this view is associated with.boolean
hasConflict()
Returnstrue
if this transaction contains local modifications that are conflicting with remote modifications,false
otherwise.boolean
hasListeners()
boolean
hasResource(java.lang.String path)
Returnstrue
if a resource with the given path exists in the repository,false
.CDOSavepoint[]
importChanges(java.io.InputStream in, boolean reconstructSavepoints)
boolean
isClosed()
boolean
isDirty()
Returnstrue
if this transaction is not closed and contains uncommitted changes,false
otherwise.boolean
isDurableView()
Returnstrue
if this view is purely durable, i.e., currently not open and active on the client-side,false
otherwise.boolean
isEmpty()
boolean
isHistorical()
boolean
isInvalidating()
boolean
isInvalidationRunnerActive()
Deprecated.boolean
isLegacyModeEnabled()
Deprecated.boolean
isObjectRegistered(CDOID id)
boolean
isReadOnly()
void
lockObjects(java.util.Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout)
Locks the given objects.void
lockObjects(java.util.Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout, boolean recursive)
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.org.eclipse.net4j.util.registry.IRegistry<java.lang.String,java.lang.Object>
properties()
void
push()
void
push(IProgressMonitor progressMonitor)
<T extends EObject>
java.util.List<T>queryInstances(EClass type)
Returns a list of the instances of the given type.<T extends EObject>
org.eclipse.net4j.util.collection.CloseableIterator<T>queryInstancesAsync(EClass type)
Returns an iterator over the instances of the given type.<T extends EObject>
org.eclipse.net4j.util.collection.CloseableIterator<T>queryInstancesAsync(EClass type, boolean exact)
Returns an iterator over the instances of the given type.java.util.List<CDOResourceNode>
queryResources(CDOResourceFolder folder, java.lang.String name, boolean exactMatch)
Returns a list of the resources in the given folder with a name equal to or starting with the value of the name parameter.org.eclipse.net4j.util.collection.CloseableIterator<CDOResourceNode>
queryResourcesAsync(CDOResourceFolder folder, java.lang.String name, boolean exactMatch)
Returns an iterator over the resources in the given folder with a name equal to or starting with the value of the name parameter.java.util.List<CDOObjectReference>
queryXRefs(java.util.Set<CDOObject> targetObjects, EReference... sourceReferences)
Returns a list ofobject references
that represent the cross references to the specified target objects.java.util.List<CDOObjectReference>
queryXRefs(CDOObject targetObject, EReference... sourceReferences)
Returns a list ofobject references
that represent the cross references to the specified target object.org.eclipse.net4j.util.collection.CloseableIterator<CDOObjectReference>
queryXRefsAsync(java.util.Set<CDOObject> targetObjects, EReference... sourceReferences)
Returns an iterator over theobject references
that represent the cross references to the specified target objects.void
refreshLockStates(java.util.function.Consumer<CDOLockState> consumer)
Refreshes thelock states
of thisview
with the latest states from the repository.int
reload(CDOObject... objects)
Deprecated.void
removeListener(org.eclipse.net4j.util.event.IListener listener)
void
removeObjectHandler(CDOObjectHandler handler)
void
removeRegistrationHandler(CDORegistrationHandler handler)
void
removeTransactionHandler(CDOTransactionHandlerBase handler)
void
rollback()
boolean
runAfterUpdate(long updateTime, java.lang.Runnable runnable)
boolean
setBranch(CDOBranch branch)
Same as callingsetBranchPoint(branch, getTimeStamp())
.boolean
setBranch(CDOBranch branch, IProgressMonitor monitor)
Same asCDOView.setBranch(CDOBranch)
withIProgressMonitor
.boolean
setBranchPoint(CDOBranch branch, long timeStamp)
Sets thebranch
and the point in (repository) time this view should refer to.boolean
setBranchPoint(CDOBranch branch, long timeStamp, IProgressMonitor monitor)
Same asCDOView.setBranchPoint(CDOBranch, long)
with aIProgressMonitor
.boolean
setBranchPoint(CDOBranchPoint branchPoint)
Same as callingsetBranchPoint(branchPoint.getBranch(), branchPoint.getTimeStamp())
.boolean
setBranchPoint(CDOBranchPoint branchPoint, IProgressMonitor monitor)
Same as callingCDOView.setBranchPoint(CDOBranchPoint)
with aIProgressMonitor
.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)
protected void
setDirty(boolean dirty)
void
setResourcePathCache(java.util.Map<java.lang.String,CDOID> resourcePathCache)
Sets the newmap
to be used as a cache for variousget*Resource*(String path)
methods.CDOSavepoint
setSavepoint()
Creates a save point in theCDOTransaction
that can be used to roll back a part of the transactionboolean
setTimeStamp(long timeStamp)
Same as callingsetBranchPoint(getBranch(), timeStamp)
.boolean
setTimeStamp(long timeStamp, IProgressMonitor monitor)
Same asCDOView.setTimeStamp(long)
withIProgressMonitor
.void
syncExec(java.lang.Runnable runnable)
<V> V
syncExec(java.util.concurrent.Callable<V> callable)
java.lang.String
toString()
void
unlockObjects()
Unlocks all locked objects of this view.void
unlockObjects(java.util.Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType)
Unlocks the given locked objects of this view.void
unlockObjects(java.util.Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, boolean recursive)
void
waitForUpdate(long updateTime)
Blocks the calling thread until a commit operation with the given time stamp (or higher) has occurred.boolean
waitForUpdate(long updateTime, long timeoutMillis)
Blocks the calling thread until a commit operation with the given time stamp (or higher) has occurred or the given timeout has expired.
-
-
-
Constructor Detail
-
CDOPushTransaction
public CDOPushTransaction(CDOTransaction delegate) throws java.io.IOException
- Throws:
java.io.IOException
-
CDOPushTransaction
public CDOPushTransaction(CDOTransaction delegate, java.io.File file) throws java.io.IOException
- Throws:
java.io.IOException
-
CDOPushTransaction
public CDOPushTransaction(CDOTransaction delegate, java.io.File file, boolean reconstructSavepoints) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getDelegate
public CDOTransaction getDelegate()
-
getFile
public java.io.File getFile()
-
properties
public final org.eclipse.net4j.util.registry.IRegistry<java.lang.String,java.lang.Object> properties()
- Specified by:
properties
in interfaceorg.eclipse.net4j.util.properties.IPropertiesContainer
- Since:
- 4.4
-
isDirty
public boolean isDirty()
Description copied from interface:CDOTransaction
Returnstrue
if this transaction is not closed and contains uncommitted changes,false
otherwise.- Specified by:
isDirty
in interfaceCDOTransaction
- Specified by:
isDirty
in interfaceCDOView
- See Also:
CDOTransaction.isDirty()
-
setDirty
protected void setDirty(boolean dirty)
-
commit
public CDOCommitInfo commit() throws CommitException
Description copied from interface:CDOUserTransaction
Same ascommit(null)
.- Specified by:
commit
in interfaceCDOUserTransaction
- Throws:
CommitException
-
commit
public CDOCommitInfo commit(IProgressMonitor monitor) throws CommitException
Description copied from interface:CDOUserTransaction
Commits the modifications of this transaction to the repository and returns acommit info
object if successful.Various kinds of problems can cause the commit to fail and not all of them can be avoided by acquiring pessimistic
locks
on 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:
commit
in interfaceCDOUserTransaction
- Throws:
CommitException
-
commit
@Deprecated public <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.- Specified by:
commit
in interfaceCDOTransaction
- Throws:
ConcurrentAccessException
CommitException
java.lang.Exception
-
commit
public <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
- Specified by:
commit
in interfaceCDOTransaction
- Throws:
ConcurrentAccessException
CommitException
java.lang.Exception
-
commit
public <T> CDOTransaction.CommitResult<T> commit(java.util.concurrent.Callable<T> callable, int attempts, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException, java.lang.Exception
- Specified by:
commit
in interfaceCDOTransaction
- Throws:
ConcurrentAccessException
CommitException
java.lang.Exception
-
commit
@Deprecated public CDOCommitInfo commit(java.lang.Runnable runnable, org.eclipse.net4j.util.Predicate<java.lang.Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException
Deprecated.- Specified by:
commit
in interfaceCDOTransaction
- Throws:
ConcurrentAccessException
CommitException
-
commit
public CDOCommitInfo commit(java.lang.Runnable runnable, java.util.function.Predicate<java.lang.Long> retry, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException
- Specified by:
commit
in interfaceCDOTransaction
- Throws:
ConcurrentAccessException
CommitException
-
commit
public CDOCommitInfo commit(java.lang.Runnable runnable, int attempts, IProgressMonitor monitor) throws ConcurrentAccessException, CommitException
- Specified by:
commit
in interfaceCDOTransaction
- Throws:
ConcurrentAccessException
CommitException
-
rollback
public void rollback()
- Specified by:
rollback
in interfaceCDOUserTransaction
-
push
public void push() throws CommitException
- Throws:
CommitException
-
push
public void push(IProgressMonitor progressMonitor) throws CommitException
- Throws:
CommitException
-
exportChanges
public CDOSavepoint[] exportChanges(java.io.OutputStream out) throws java.io.IOException
- Specified by:
exportChanges
in interfaceCDOTransaction
- Throws:
java.io.IOException
-
importChanges
public CDOSavepoint[] importChanges(java.io.InputStream in, boolean reconstructSavepoints) throws java.io.IOException
- Specified by:
importChanges
in interfaceCDOTransaction
- Throws:
java.io.IOException
-
getLastCommitTime
public long getLastCommitTime()
- Specified by:
getLastCommitTime
in interfaceCDOTransaction
-
addListener
public void addListener(org.eclipse.net4j.util.event.IListener listener)
- Specified by:
addListener
in interfaceorg.eclipse.net4j.util.event.INotifier
- Overrides:
addListener
in classorg.eclipse.net4j.util.event.Notifier
-
removeListener
public void removeListener(org.eclipse.net4j.util.event.IListener listener)
- Specified by:
removeListener
in interfaceorg.eclipse.net4j.util.event.INotifier
- Overrides:
removeListener
in classorg.eclipse.net4j.util.event.Notifier
-
hasListeners
public boolean hasListeners()
- Specified by:
hasListeners
in interfaceorg.eclipse.net4j.util.event.INotifier
- Overrides:
hasListeners
in classorg.eclipse.net4j.util.event.Notifier
-
getListeners
public org.eclipse.net4j.util.event.IListener[] getListeners()
- Specified by:
getListeners
in interfaceorg.eclipse.net4j.util.event.INotifier
- Overrides:
getListeners
in classorg.eclipse.net4j.util.event.Notifier
-
addObjectHandler
public void addObjectHandler(CDOObjectHandler handler)
- Specified by:
addObjectHandler
in interfaceCDOView
-
addRegistrationHandler
public void addRegistrationHandler(CDORegistrationHandler handler)
- Specified by:
addRegistrationHandler
in interfaceCDOView
- Since:
- 4.6
-
addTransactionHandler
public void addTransactionHandler(CDOTransactionHandlerBase handler)
- Specified by:
addTransactionHandler
in interfaceCDOTransaction
- Since:
- 4.0
-
close
public void close()
- Specified by:
close
in interfaceorg.eclipse.net4j.util.collection.Closeable
-
createQuery
public CDOQuery createQuery(java.lang.String language, java.lang.String queryString)
Description copied from interface:CDOView
Same ascreateQuery(language, queryString, null)
.- Specified by:
createQuery
in interfaceCDOView
- See Also:
CDOView.createQuery(String, String, Object)
-
createQuery
public CDOQuery createQuery(java.lang.String language, java.lang.String queryString, java.lang.Object context)
- Specified by:
createQuery
in interfaceCDOView
- Since:
- 4.0
-
createQuery
public CDOQuery createQuery(java.lang.String language, java.lang.String queryString, boolean considerDirtyState)
- Specified by:
createQuery
in interfaceCDOTransaction
- Since:
- 4.0
-
createQuery
public CDOQuery createQuery(java.lang.String language, java.lang.String queryString, java.lang.Object context, boolean considerDirtyState)
- Specified by:
createQuery
in interfaceCDOTransaction
- Since:
- 4.0
-
createResourceFolder
public CDOResourceFolder createResourceFolder(java.lang.String path)
- Specified by:
createResourceFolder
in interfaceCDOTransaction
- Since:
- 4.0
-
createResource
public CDOResource createResource(java.lang.String path)
- Specified by:
createResource
in interfaceCDOTransaction
- See Also:
ResourceSet.createResource(URI)
-
isLegacyModeEnabled
@Deprecated public boolean isLegacyModeEnabled()
Deprecated.- Specified by:
isLegacyModeEnabled
in interfaceCDOView
- See Also:
CDOUtil.setLegacyModeDefault(boolean)
-
getLastUpdateTime
public long getLastUpdateTime()
Description copied from interface:CDOUpdatable
Returns the time stamp of the last commit operation. May not be accurate ifpassive updates
are disabled.- Specified by:
getLastUpdateTime
in interfaceCDOUpdatable
-
waitForUpdate
public void waitForUpdate(long updateTime)
Description copied from interface:CDOUpdatable
Blocks the calling thread until a commit operation with the given time stamp (or higher) has occurred.- Specified by:
waitForUpdate
in interfaceCDOUpdatable
-
waitForUpdate
public boolean waitForUpdate(long updateTime, long timeoutMillis)
Description copied from interface:CDOUpdatable
Blocks the calling thread until a commit operation with the given time stamp (or higher) has occurred or the given timeout has expired.- Specified by:
waitForUpdate
in interfaceCDOUpdatable
- Returns:
true
if the specified commit operation has occurred within the given timeout period,false
otherwise.
-
runAfterUpdate
public boolean runAfterUpdate(long updateTime, java.lang.Runnable runnable)
- Specified by:
runAfterUpdate
in interfaceCDOUpdatable
- Since:
- 4.3
-
getConflicts
public java.util.Set<CDOObject> getConflicts()
Description copied from interface:CDOTransaction
Returns the set of objects that are conflicting with remote modifications or an empty set ifCDOTransaction.hasConflict()
returnsfalse
.- Specified by:
getConflicts
in interfaceCDOTransaction
-
getChangeSetData
public CDOChangeSetData getChangeSetData()
- Specified by:
getChangeSetData
in interfaceCDOChangeSetDataProvider
- Since:
- 4.0
-
getDetachedObjects
public java.util.Map<CDOID,CDOObject> getDetachedObjects()
- Specified by:
getDetachedObjects
in interfaceCDOTransaction
-
getDirtyObjects
public java.util.Map<CDOID,CDOObject> getDirtyObjects()
- Specified by:
getDirtyObjects
in interfaceCDOTransaction
-
getRevision
public CDORevision getRevision(CDOID id)
- Specified by:
getRevision
in interfaceCDORevisionProvider
- Since:
- 4.0
-
getFirstSavepoint
public CDOSavepoint getFirstSavepoint()
- Specified by:
getFirstSavepoint
in interfaceCDOTransaction
- Since:
- 4.1
-
getLastSavepoint
public CDOSavepoint getLastSavepoint()
- Specified by:
getLastSavepoint
in interfaceCDOTransaction
- Specified by:
getLastSavepoint
in interfaceCDOUserTransaction
-
isInvalidationRunnerActive
@Deprecated public boolean isInvalidationRunnerActive()
Deprecated.- Specified by:
isInvalidationRunnerActive
in interfaceCDOView
- Since:
- 4.0
-
isInvalidating
public boolean isInvalidating()
- Specified by:
isInvalidating
in interfaceCDOView
- Since:
- 4.7
-
getNewObjects
public java.util.Map<CDOID,CDOObject> getNewObjects()
- Specified by:
getNewObjects
in interfaceCDOTransaction
-
getObjects
public java.util.Map<CDOID,CDOObject> getObjects(java.util.Collection<CDOID> ids)
Description copied from interface:CDOView
Returns 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:
getObjects
in 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
public CDOObject getObject(CDOID id, boolean loadOnDemand)
Description copied from interface:CDOView
Returns the object for the given CDOID.
-
getObject
public CDOObject getObject(CDOID id)
Description copied from interface:CDOView
Returns the object for the given CDOID.Same as
getObject(id, true)
.- Specified by:
getObject
in interfaceCDOView
- See Also:
CDOView.getObject(CDOID, boolean)
-
getObject
public <T extends EObject> T getObject(T objectFromDifferentView)
Description copied from interface:CDOView
Takes 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
CDOObject
it is returned unmodified. - If the view of the given object is contained in a different session an
IllegalArgumentException
is thrown. - If
null
is passednull
is returned.
-
getObjectHandlers
public CDOObjectHandler[] getObjectHandlers()
- Specified by:
getObjectHandlers
in interfaceCDOView
-
getRegistrationHandlers
public CDORegistrationHandler[] getRegistrationHandlers()
- Specified by:
getRegistrationHandlers
in interfaceCDOView
- Since:
- 4.6
-
getOrCreateResource
public CDOResource getOrCreateResource(java.lang.String path)
- Specified by:
getOrCreateResource
in interfaceCDOTransaction
-
getOrCreateResourceFolder
public CDOResourceFolder getOrCreateResourceFolder(java.lang.String path)
- Specified by:
getOrCreateResourceFolder
in interfaceCDOTransaction
- Since:
- 4.0
-
getResource
public CDOResource getResource(java.lang.String path, boolean loadOnDemand) throws CDOResourceNodeNotFoundException
- Specified by:
getResource
in interfaceCDOView
- Throws:
CDOResourceNodeNotFoundException
- See Also:
ResourceSet.getResource(URI, boolean)
-
getResource
public CDOResource getResource(java.lang.String path) throws CDOResourceNodeNotFoundException
Description copied from interface:CDOView
Same asgetResource(String, true)
.- Specified by:
getResource
in interfaceCDOView
- Throws:
CDOResourceNodeNotFoundException
- See Also:
ResourceSet.getResource(URI, boolean)
-
getResourceNode
public CDOResourceNode getResourceNode(java.lang.String path) throws CDOResourceNodeNotFoundException
Description copied from interface:CDOView
Returns the resource node with the given path.- Specified by:
getResourceNode
in interfaceCDOView
- Returns:
- never
null
. - Throws:
CDOResourceNodeNotFoundException
-
createTextResource
public CDOTextResource createTextResource(java.lang.String path)
- Specified by:
createTextResource
in interfaceCDOTransaction
- Since:
- 4.2
-
getOrCreateTextResource
public CDOTextResource getOrCreateTextResource(java.lang.String path)
- Specified by:
getOrCreateTextResource
in interfaceCDOTransaction
- Since:
- 4.2
-
createBinaryResource
public CDOBinaryResource createBinaryResource(java.lang.String path)
- Specified by:
createBinaryResource
in interfaceCDOTransaction
- Since:
- 4.2
-
getOrCreateBinaryResource
public CDOBinaryResource getOrCreateBinaryResource(java.lang.String path)
- Specified by:
getOrCreateBinaryResource
in interfaceCDOTransaction
- Since:
- 4.2
-
getTextResource
public CDOTextResource getTextResource(java.lang.String path) throws CDOResourceNodeNotFoundException
- Specified by:
getTextResource
in interfaceCDOView
- Throws:
CDOResourceNodeNotFoundException
- Since:
- 4.2
-
getBinaryResource
public CDOBinaryResource getBinaryResource(java.lang.String path) throws CDOResourceNodeNotFoundException
- Specified by:
getBinaryResource
in interfaceCDOView
- Throws:
CDOResourceNodeNotFoundException
- Since:
- 4.2
-
getResourceFolder
public CDOResourceFolder getResourceFolder(java.lang.String path) throws CDOResourceNodeNotFoundException
- Specified by:
getResourceFolder
in interfaceCDOView
- Throws:
CDOResourceNodeNotFoundException
- Since:
- 4.2
-
setResourcePathCache
public void setResourcePathCache(java.util.Map<java.lang.String,CDOID> resourcePathCache)
Description copied from interface:CDOView
Sets the newmap
to 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. Passingnull
disables resource path caching.The default value is
new HashMap<String, CDOID>()
.- Specified by:
setResourcePathCache
in interfaceCDOView
- Since:
- 4.2
- See Also:
CDOView.getResourceNode(String)
,CDOView.getResource(String)
,CDOView.getResource(String, boolean)
,CDOView.getBinaryResource(String)
,CDOView.getTextResource(String)
,CDOView.getResourceFolder(String)
,CDOView.hasResource(String)
-
getResourceSet
public ResourceSet getResourceSet()
Description copied from interface:CDOView
Returns theresource set
this view is associated with.Same as calling getViewSet().getResourceSet().
- Specified by:
getResourceSet
in interfaceCDOView
- See Also:
CDOViewSet.getResourceSet()
-
getRevisionDeltas
public java.util.Map<CDOID,CDORevisionDelta> getRevisionDeltas()
- Specified by:
getRevisionDeltas
in interfaceCDOTransaction
-
getRootResource
public CDOResource getRootResource()
Description copied from interface:CDOView
Returns the root resource of the repository.The root resource is a special resource with only
CDOResourceNodes
in its contents list. You can use it as the main entry into the new resource and folder structure.- Specified by:
getRootResource
in interfaceCDOView
-
getSession
public CDOSession getSession()
Description copied from interface:CDOView
Returns thesession
this view was opened by.- Specified by:
getSession
in interfaceCDOCommonView
- Specified by:
getSession
in interfaceCDOView
- Returns:
- The session this view was opened by, or
null
if this view is closed. - See Also:
Closeable.close()
,Closeable.isClosed()
,CDOViewContainer.openView()
,CDOTransactionContainer.openTransaction()
-
getProvider
public CDOViewProvider getProvider()
Description copied from interface:CDOView
Returns theprovider
that has opened this view.- Specified by:
getProvider
in interfaceCDOView
- Since:
- 4.4
-
createResourceURI
public URI createResourceURI(java.lang.String path)
Description copied from interface:CDOView
Returns aURI
that can be used inResourceSet.getResource(URI, boolean)
to load the resource with the specified path.- Specified by:
createResourceURI
in interfaceCDOView
- Since:
- 4.4
-
getTimeStamp
public long getTimeStamp()
Description copied from interface:CDOBranchPoint
Returns the time stamp of this branch point, or the fixed special time stampunspecified
if this branch point marks thehead
of a branch.- Specified by:
getTimeStamp
in interfaceCDOBranchPoint
- Specified by:
getTimeStamp
in interfaceCDOTimeProvider
-
getDurableLockingID
public java.lang.String getDurableLockingID()
- Specified by:
getDurableLockingID
in interfaceCDOCommonView
- Specified by:
getDurableLockingID
in interfaceCDOLockOwner
- Since:
- 4.0
-
getTransactionHandlers
public CDOTransactionHandler[] getTransactionHandlers()
- Specified by:
getTransactionHandlers
in interfaceCDOTransaction
-
getTransactionHandlers1
public CDOTransactionHandler1[] getTransactionHandlers1()
- Specified by:
getTransactionHandlers1
in interfaceCDOTransaction
- Since:
- 4.0
-
getTransactionHandlers2
public CDOTransactionHandler2[] getTransactionHandlers2()
- Specified by:
getTransactionHandlers2
in interfaceCDOTransaction
- Since:
- 4.0
-
getSessionID
public int getSessionID()
- Specified by:
getSessionID
in interfaceCDOLockOwner
- Returns:
- the ID identifying the session that owns the view
- Since:
- 4.1
-
isDurableView
public boolean isDurableView()
Description copied from interface:CDOLockOwner
Returnstrue
if this view is purely durable, i.e., currently not open and active on the client-side,false
otherwise.- Specified by:
isDurableView
in interfaceCDOLockOwner
- Since:
- 4.1
-
getViewID
public int getViewID()
- Specified by:
getViewID
in interfaceCDOCommonView
- Specified by:
getViewID
in interfaceCDOLockOwner
- Returns:
- the ID identifying the view within the session
-
getViewSet
public CDOViewSet getViewSet()
Description copied from interface:CDOView
Returns theview set
this view is associated with.- Specified by:
getViewSet
in interfaceCDOView
- Returns:
- The view set this view is associated with, never
null
. - See Also:
CDOViewSet.getViews()
-
getViewLock
public java.util.concurrent.locks.Lock getViewLock()
- Specified by:
getViewLock
in interfaceCDOView
- Since:
- 4.5
-
syncExec
public void syncExec(java.lang.Runnable runnable)
-
syncExec
public <V> V syncExec(java.util.concurrent.Callable<V> callable) throws java.lang.Exception
-
hasConflict
public boolean hasConflict()
Description copied from interface:CDOTransaction
Returnstrue
if this transaction contains local modifications that are conflicting with remote modifications,false
otherwise.- Specified by:
hasConflict
in interfaceCDOTransaction
- Specified by:
hasConflict
in interfaceCDOView
- See Also:
CDOTransaction.hasConflict()
-
hasResource
public boolean hasResource(java.lang.String path)
Description copied from interface:CDOView
Returnstrue
if a resource with the given path exists in the repository,false
. Applies tofile resources
, as well.- Specified by:
hasResource
in interfaceCDOView
- See Also:
CDOView.getResource(String, boolean)
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in interfaceorg.eclipse.net4j.util.collection.Closeable
-
isObjectRegistered
public boolean isObjectRegistered(CDOID id)
Description copied from interface:CDOView
- Specified by:
isObjectRegistered
in interfaceCDOView
-
refreshLockStates
public void refreshLockStates(java.util.function.Consumer<CDOLockState> consumer)
Description copied from interface:CDOView
Refreshes thelock states
of thisview
with the latest states from the repository. If a lock state consumer is passed it is called for each resulting new lock state.- Specified by:
refreshLockStates
in interfaceCDOView
- Since:
- 4.12
-
getLockStates
public CDOLockState[] getLockStates(java.util.Collection<CDOID> ids)
Description copied from interface:CDOView
Get an array oflock states
corresponding to the specified collection ofids
. If the collection ofids
is empty,lock states
of all locked objects are returned.- Specified by:
getLockStates
in interfaceCDOView
- Since:
- 4.6
-
getLockStatesOfObjects
public CDOLockState[] getLockStatesOfObjects(java.util.Collection<? extends CDOObject> objects)
Description copied from interface:CDOView
Get an array oflock states
corresponding to the specified collection ofobjects
. If the collection ofobjects
is empty,lock states
of all locked objects are returned.- Specified by:
getLockStatesOfObjects
in interfaceCDOView
- Since:
- 4.6
-
lockObjects
public void lockObjects(java.util.Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout) throws java.lang.InterruptedException
Description copied from interface:CDOView
Locks the given objects. Once the objects are locked, they will not be changed remotely or go in conflict state.- Specified by:
lockObjects
in interfaceCDOView
- Throws:
java.lang.InterruptedException
-
lockObjects
public void lockObjects(java.util.Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, long timeout, boolean recursive) throws java.lang.InterruptedException
- Specified by:
lockObjects
in interfaceCDOView
- Throws:
java.lang.InterruptedException
-
options
public CDOTransaction.Options options()
Description copied from interface:CDOCommonView
Returns theoptions
of this view.- Specified by:
options
in interfaceCDOCommonView
- Specified by:
options
in interfaceCDOTransaction
- Specified by:
options
in interfaceCDOView
- Specified by:
options
in interfaceorg.eclipse.net4j.util.options.IOptionsContainer
-
queryResources
public java.util.List<CDOResourceNode> queryResources(CDOResourceFolder folder, java.lang.String name, boolean exactMatch)
Description copied from interface:CDOView
Returns 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:
queryResources
in interfaceCDOView
- Parameters:
folder
- The folder to search in, ornull
for top level resource nodes.name
- the name or prefix of the resource nodes to return.exactMatch
-true
if the complete name of the resource must match,false
if only a common prefix of the name must match.
-
queryResourcesAsync
public org.eclipse.net4j.util.collection.CloseableIterator<CDOResourceNode> queryResourcesAsync(CDOResourceFolder folder, java.lang.String name, boolean exactMatch)
Description copied from interface:CDOView
Returns 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:
queryResourcesAsync
in interfaceCDOView
- Parameters:
folder
- The folder to search in, ornull
for top level resource nodes.name
- the name or prefix of the resource nodes to return.exactMatch
-true
if the complete name of the resource must match,false
if only a common prefix of the name must match.
-
queryInstances
public <T extends EObject> java.util.List<T> queryInstances(EClass type)
Description copied from interface:CDOView
Returns a list of the instances of the given type.- Specified by:
queryInstances
in interfaceCDOView
- Since:
- 4.3
-
queryInstancesAsync
public <T extends EObject> org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type)
Description copied from interface:CDOView
Returns an iterator over the instances of the given type. The underlying query will be executed asynchronously.- Specified by:
queryInstancesAsync
in interfaceCDOView
- Since:
- 4.3
-
queryInstancesAsync
public <T extends EObject> org.eclipse.net4j.util.collection.CloseableIterator<T> queryInstancesAsync(EClass type, boolean exact)
Description copied from interface:CDOView
Returns an iterator over the instances of the given type. The underlying query will be executed asynchronously.- Specified by:
queryInstancesAsync
in interfaceCDOView
- Since:
- 4.6
-
queryXRefs
public java.util.List<CDOObjectReference> queryXRefs(CDOObject targetObject, EReference... sourceReferences)
Description copied from interface:CDOView
Returns a list ofobject references
that represent the cross references to the specified target object.- Specified by:
queryXRefs
in 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:
CDOView.queryXRefs(Set, EReference...)
,CDOView.queryXRefsAsync(Set, EReference...)
,CDOUtil.wrapExternalObject(EObject, CDOView)
-
queryXRefs
public java.util.List<CDOObjectReference> queryXRefs(java.util.Set<CDOObject> targetObjects, EReference... sourceReferences)
Description copied from interface:CDOView
Returns a list ofobject references
that represent the cross references to the specified target objects.- Specified by:
queryXRefs
in 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:
CDOView.queryXRefs(CDOObject, EReference...)
,CDOView.queryXRefsAsync(Set, EReference...)
,CDOUtil.wrapExternalObject(EObject, CDOView)
-
queryXRefsAsync
public org.eclipse.net4j.util.collection.CloseableIterator<CDOObjectReference> queryXRefsAsync(java.util.Set<CDOObject> targetObjects, EReference... sourceReferences)
Description copied from interface:CDOView
Returns an iterator over theobject references
that represent the cross references to the specified target objects. The underlying query will be executed asynchronously.- Specified by:
queryXRefsAsync
in 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:
CDOView.queryXRefs(CDOObject, EReference...)
,CDOView.queryXRefs(Set, EReference...)
,CDOUtil.wrapExternalObject(EObject, CDOView)
-
reload
@Deprecated public int reload(CDOObject... objects)
Deprecated.Description copied from interface:CDOView
Reloads the givenobjects
from the repository.
-
removeObjectHandler
public void removeObjectHandler(CDOObjectHandler handler)
- Specified by:
removeObjectHandler
in interfaceCDOView
-
removeRegistrationHandler
public void removeRegistrationHandler(CDORegistrationHandler handler)
- Specified by:
removeRegistrationHandler
in interfaceCDOView
- Since:
- 4.6
-
removeTransactionHandler
public void removeTransactionHandler(CDOTransactionHandlerBase handler)
- Specified by:
removeTransactionHandler
in interfaceCDOTransaction
- Since:
- 4.0
-
merge
public CDOChangeSetData merge(CDOBranch source, CDOMerger merger)
Description copied from interface:CDOTransaction
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
.- Specified by:
merge
in interfaceCDOTransaction
- Since:
- 4.6
- See Also:
CDOTransaction.merge(CDOBranchPoint, CDOMerger)
-
merge
public CDOChangeSetData merge(CDOBranchPoint source, CDOMerger merger)
Description copied from interface:CDOTransaction
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
.- Specified by:
merge
in interfaceCDOTransaction
-
merge
public CDOChangeSetData merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOMerger merger)
Description copied from interface:CDOTransaction
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:
- Specified by:
merge
in interfaceCDOTransaction
- Since:
- 4.0
-
merge
public CDOChangeSetData merge(CDOBranchPoint source, CDOBranchPoint sourceBase, CDOBranchPoint targetBase, CDOMerger merger)
Description copied from interface:CDOTransaction
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".
- Specified by:
merge
in interfaceCDOTransaction
- Since:
- 4.6
- See Also:
CDOTransaction.merge(CDOBranchPoint, CDOMerger)
,CDOTransaction.merge(CDOBranch, CDOMerger)
-
compareRevisions
public CDOChangeSetData compareRevisions(CDOBranchPoint source)
- Specified by:
compareRevisions
in interfaceCDOView
- Since:
- 4.0
-
getHistory
public CDOCommitHistory getHistory()
- Specified by:
getHistory
in interfaceCDOCommitHistory.Provider<CDOObject,CDOObjectHistory>
- Since:
- 4.2
-
getHistory
public CDOObjectHistory getHistory(CDOObject object)
- Specified by:
getHistory
in interfaceCDOCommitHistory.Provider<CDOObject,CDOObjectHistory>
- Since:
- 4.2
-
setSavepoint
public 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 interfaceCDOTransaction
- Specified by:
setSavepoint
in interfaceCDOUserTransaction
-
unlockObjects
public void unlockObjects()
Description copied from interface:CDOView
Unlocks all locked objects of this view.- Specified by:
unlockObjects
in interfaceCDOView
-
unlockObjects
public void unlockObjects(java.util.Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType)
Description copied from interface:CDOView
Unlocks the given locked objects of this view.- Specified by:
unlockObjects
in interfaceCDOView
-
unlockObjects
public void unlockObjects(java.util.Collection<? extends CDOObject> objects, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, boolean recursive)
- Specified by:
unlockObjects
in interfaceCDOView
-
enableDurableLocking
@Deprecated public java.lang.String enableDurableLocking(boolean enable)
Deprecated.UseenableDurableLocking()
instead ordisableDurableLocking(boolean)
, respectively.- Specified by:
enableDurableLocking
in interfaceCDOView
- Since:
- 4.0
-
enableDurableLocking
public java.lang.String enableDurableLocking()
Description copied from interface:CDOView
Enables the storage of all information that's needed toreopen
this 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 atransaction
and all the locks that are acquired or will be acquired while durable locking is enabled.- Specified by:
enableDurableLocking
in interfaceCDOView
- Since:
- 4.1
- See Also:
CDOViewContainer.openView(String)
,CDOViewOpener.openView(String, ResourceSet)
,CDOTransactionContainer.openTransaction(String)
,CDOTransactionOpener.openTransaction(String, ResourceSet)
,CDOView.disableDurableLocking(boolean)
-
disableDurableLocking
public void disableDurableLocking(boolean releaseLocks)
Description copied from interface:CDOView
Disables the storage of all information that's needed toreopen
this 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 iftrue
is passed to thereleaseLocks
parameter.- Specified by:
disableDurableLocking
in interfaceCDOView
- Since:
- 4.1
- See Also:
CDOView.enableDurableLocking()
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnly
in interfaceCDOCommonView
-
isHistorical
public boolean isHistorical()
- Specified by:
isHistorical
in interfaceCDOCommonView
- Since:
- 4.5
-
getBranch
public CDOBranch getBranch()
Description copied from interface:CDOBranchPoint
Returns the branch of this branch point, ornull
if this branch point is thebase
of themain branch
.- Specified by:
getBranch
in interfaceCDOBranchPoint
- Specified by:
getBranch
in interfaceCDOBranchProvider
-
setBranchPoint
public boolean setBranchPoint(CDOBranch branch, long timeStamp)
Description copied from interface:CDOView
Sets thebranch
and the point in (repository) time this view should refer to.Objects
provided by this view will bevalid
at this time. The special valueUNSPECIFIED_DATE
denotes a "floating view" that always shows the latest state of the repository.- Specified by:
setBranchPoint
in interfaceCDOView
- Returns:
true
if the branch point was changed,false
otherwise.
-
setBranchPoint
public boolean setBranchPoint(CDOBranch branch, long timeStamp, IProgressMonitor monitor)
Description copied from interface:CDOView
Same asCDOView.setBranchPoint(CDOBranch, long)
with aIProgressMonitor
.- Specified by:
setBranchPoint
in interfaceCDOView
- Since:
- 4.4
-
setBranchPoint
public boolean setBranchPoint(CDOBranchPoint branchPoint)
Description copied from interface:CDOView
Same as callingsetBranchPoint(branchPoint.getBranch(), branchPoint.getTimeStamp())
.- Specified by:
setBranchPoint
in interfaceCDOView
-
setBranchPoint
public boolean setBranchPoint(CDOBranchPoint branchPoint, IProgressMonitor monitor)
Description copied from interface:CDOView
Same as callingCDOView.setBranchPoint(CDOBranchPoint)
with aIProgressMonitor
.- Specified by:
setBranchPoint
in interfaceCDOView
- Since:
- 4.4
-
setBranch
public boolean setBranch(CDOBranch branch)
Description copied from interface:CDOView
Same as callingsetBranchPoint(branch, getTimeStamp())
.
-
setBranch
public boolean setBranch(CDOBranch branch, IProgressMonitor monitor)
Description copied from interface:CDOView
Same asCDOView.setBranch(CDOBranch)
withIProgressMonitor
.
-
setTimeStamp
public boolean setTimeStamp(long timeStamp)
Description copied from interface:CDOView
Same as callingsetBranchPoint(getBranch(), timeStamp)
.- Specified by:
setTimeStamp
in interfaceCDOView
-
setTimeStamp
public boolean setTimeStamp(long timeStamp, IProgressMonitor monitor)
Description copied from interface:CDOView
Same asCDOView.setTimeStamp(long)
withIProgressMonitor
.- Specified by:
setTimeStamp
in interfaceCDOView
- Since:
- 4.4
-
getURIHandler
public URIHandler getURIHandler()
- Specified by:
getURIHandler
in interfaceCDOView
-
getUnitManager
public CDOUnitManager getUnitManager()
- Specified by:
getUnitManager
in interfaceCDOView
- Since:
- 4.5
-
getCommitComment
public java.lang.String getCommitComment()
Description copied from interface:CDOTransaction
Returns the comment to be used in the next commit operation.- Specified by:
getCommitComment
in interfaceCDOTransaction
- See Also:
CDOCommitInfo.getComment()
-
setCommitComment
public void setCommitComment(java.lang.String comment)
Description copied from interface:CDOTransaction
Sets the comment to be used in the next commit operation.- Specified by:
setCommitComment
in interfaceCDOTransaction
- See Also:
CDOCommitInfo.getComment()
-
setCommittables
public void setCommittables(java.util.Set<? extends EObject> committables)
- Specified by:
setCommittables
in interfaceCDOTransaction
- Since:
- 4.0
-
getCommittables
public java.util.Set<? extends EObject> getCommittables()
- Specified by:
getCommittables
in interfaceCDOTransaction
- Since:
- 4.0
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceorg.eclipse.net4j.util.container.IContainer<CDOResourceNode>
- Since:
- 4.2
-
getElements
public CDOResourceNode[] getElements()
- Specified by:
getElements
in interfaceorg.eclipse.net4j.util.container.IContainer<CDOResourceNode>
- Since:
- 4.2
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAdapter
public java.lang.Object getAdapter(java.lang.Class adapter)
- Specified by:
getAdapter
in interfaceIAdaptable
- Since:
- 4.2
-
createTempFile
public static java.io.File createTempFile(CDOTransaction transaction) throws java.io.IOException
- Throws:
java.io.IOException
-
-