org.eclipse.emf.spi.cdo
Interface InternalCDOView
- All Superinterfaces:
- CDOCommonView, CDOIDProvider, CDOView, org.eclipse.net4j.util.collection.Closeable, org.eclipse.net4j.util.lifecycle.ILifecycle, org.eclipse.net4j.util.lifecycle.ILifecycle.Introspection, org.eclipse.net4j.util.event.INotifier, org.eclipse.net4j.util.options.IOptionsContainer
- All Known Subinterfaces:
- InternalCDOTransaction
public interface InternalCDOView
- extends CDOView, CDOIDProvider, org.eclipse.net4j.util.lifecycle.ILifecycle.Introspection
- Since:
- 2.0
| Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier |
org.eclipse.net4j.util.event.INotifier.Introspection |
| Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle |
org.eclipse.net4j.util.lifecycle.ILifecycle.Introspection |
|
Method Summary |
void |
attachResource(CDOResourceImpl resource)
|
java.lang.Object |
convertIDToObject(java.lang.Object potentialID)
|
java.lang.Object |
convertObjectToID(java.lang.Object potentialObject)
|
java.lang.Object |
convertObjectToID(java.lang.Object potentialObject,
boolean onlyPersistedID)
|
void |
deregisterObject(InternalCDOObject object)
|
void |
getCDOIDAndVersion(java.util.Map<CDOID,CDOIDAndVersion> uniqueObjects,
java.util.Collection<? extends CDOObject> cdoObjects)
|
CDOFeatureAnalyzer |
getFeatureAnalyzer()
|
InternalCDOObject[] |
getObjectsArray()
|
CDOID |
getResourceNodeID(java.lang.String path)
|
InternalCDORevision |
getRevision(CDOID id,
boolean loadOnDemand)
|
InternalCDOSession |
getSession()
Returns the session this view was opened by. |
java.util.concurrent.locks.ReentrantLock |
getStateLock()
Each time CDORevision or CDOState of an CDOObject is modified, ensure that no concurrent access is modifying it at
the same time. |
org.eclipse.emf.internal.cdo.CDOStore |
getStore()
|
InternalCDOViewSet |
getViewSet()
Returns the view set this view is associated with. |
void |
handleAddAdapter(InternalCDOObject eObject,
org.eclipse.emf.common.notify.Adapter adapter)
|
void |
handleChangeSubscription(java.util.Collection<CDORevisionDelta> deltas,
java.util.Collection<CDOID> detachedObjects)
|
java.util.Set<CDOObject> |
handleInvalidation(long timeStamp,
java.util.Set<CDOIDAndVersion> dirtyOIDs,
java.util.Collection<CDOID> detachedOIDs)
Returns the conflicting objects. |
java.util.Set<CDOObject> |
handleInvalidationWithoutNotification(java.util.Set<CDOIDAndVersion> dirtyOIDs,
java.util.Collection<CDOID> detachedOIDs,
java.util.Set<InternalCDOObject> dirtyObjects,
java.util.Set<InternalCDOObject> detachedObjects)
|
void |
handleRemoveAdapter(InternalCDOObject eObject,
org.eclipse.emf.common.notify.Adapter adapter)
|
boolean |
hasSubscription(CDOID id)
|
boolean |
isObjectLocked(CDOObject object,
org.eclipse.net4j.util.concurrent.RWLockManager.LockType lockType,
boolean byOthers)
|
void |
registerObject(InternalCDOObject object)
|
void |
registerProxyResource(CDOResourceImpl resource)
|
void |
remapObject(CDOID oldID)
|
InternalCDOObject |
removeObject(CDOID id)
|
void |
setFeatureAnalyzer(CDOFeatureAnalyzer featureAnalyzer)
|
void |
setSession(InternalCDOSession session)
|
void |
setViewID(int viewId)
|
void |
setViewSet(InternalCDOViewSet viewSet)
|
void |
subscribe(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.common.notify.Adapter adapter)
|
InternalCDOTransaction |
toTransaction()
|
void |
unsubscribe(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.common.notify.Adapter adapter)
|
| Methods inherited from interface org.eclipse.emf.cdo.view.CDOView |
createQuery, getLock, getObject, getObject, getObject, getResource, getResource, getResourceNode, getResourceSet, getRootResource, getURIHandler, hasConflict, hasResource, isDirty, isObjectRegistered, lockObjects, options, queryResources, queryResourcesAsync, reload, unlockObjects, unlockObjects |
| Methods inherited from interface org.eclipse.net4j.util.collection.Closeable |
close, isClosed |
| Methods inherited from interface org.eclipse.net4j.util.event.INotifier |
addListener, removeListener |
| Methods inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle.Introspection |
getLifecycleState, isActive |
| Methods inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle |
activate, deactivate |
setViewID
void setViewID(int viewId)
getSession
InternalCDOSession getSession()
- Description copied from interface:
CDOView
- Returns the
session this view was opened by.
- Specified by:
getSession in interface CDOCommonView- Specified by:
getSession in interface CDOView
- Returns:
- The session this view was opened by, or
null if this view is closed. - See Also:
Closeable.close(),
Closeable.isClosed(),
CDOSession.openView(),
CDOSession.openView(ResourceSet),
CDOSession.openAudit(long),
CDOSession.openAudit(ResourceSet, long),
CDOSession.openTransaction(),
CDOSession.openTransaction(ResourceSet)
setSession
void setSession(InternalCDOSession session)
getViewSet
InternalCDOViewSet getViewSet()
- Description copied from interface:
CDOView
- Returns the
view set this view is associated with.
- Specified by:
getViewSet in interface CDOView
- Returns:
- The view set this view is associated with, never
null. - See Also:
CDOViewSet.getViews()
setViewSet
void setViewSet(InternalCDOViewSet viewSet)
getFeatureAnalyzer
CDOFeatureAnalyzer getFeatureAnalyzer()
setFeatureAnalyzer
void setFeatureAnalyzer(CDOFeatureAnalyzer featureAnalyzer)
getStore
org.eclipse.emf.internal.cdo.CDOStore getStore()
toTransaction
InternalCDOTransaction toTransaction()
attachResource
void attachResource(CDOResourceImpl resource)
handleInvalidation
java.util.Set<CDOObject> handleInvalidation(long timeStamp,
java.util.Set<CDOIDAndVersion> dirtyOIDs,
java.util.Collection<CDOID> detachedOIDs)
- Returns the conflicting objects.
handleInvalidationWithoutNotification
java.util.Set<CDOObject> handleInvalidationWithoutNotification(java.util.Set<CDOIDAndVersion> dirtyOIDs,
java.util.Collection<CDOID> detachedOIDs,
java.util.Set<InternalCDOObject> dirtyObjects,
java.util.Set<InternalCDOObject> detachedObjects)
getCDOIDAndVersion
void getCDOIDAndVersion(java.util.Map<CDOID,CDOIDAndVersion> uniqueObjects,
java.util.Collection<? extends CDOObject> cdoObjects)
handleChangeSubscription
void handleChangeSubscription(java.util.Collection<CDORevisionDelta> deltas,
java.util.Collection<CDOID> detachedObjects)
getObjectsArray
InternalCDOObject[] getObjectsArray()
remapObject
void remapObject(CDOID oldID)
getResourceNodeID
CDOID getResourceNodeID(java.lang.String path)
registerProxyResource
void registerProxyResource(CDOResourceImpl resource)
registerObject
void registerObject(InternalCDOObject object)
deregisterObject
void deregisterObject(InternalCDOObject object)
removeObject
InternalCDOObject removeObject(CDOID id)
getRevision
InternalCDORevision getRevision(CDOID id,
boolean loadOnDemand)
convertObjectToID
java.lang.Object convertObjectToID(java.lang.Object potentialObject)
convertObjectToID
java.lang.Object convertObjectToID(java.lang.Object potentialObject,
boolean onlyPersistedID)
convertIDToObject
java.lang.Object convertIDToObject(java.lang.Object potentialID)
isObjectLocked
boolean isObjectLocked(CDOObject object,
org.eclipse.net4j.util.concurrent.RWLockManager.LockType lockType,
boolean byOthers)
handleAddAdapter
void handleAddAdapter(InternalCDOObject eObject,
org.eclipse.emf.common.notify.Adapter adapter)
handleRemoveAdapter
void handleRemoveAdapter(InternalCDOObject eObject,
org.eclipse.emf.common.notify.Adapter adapter)
subscribe
void subscribe(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.common.notify.Adapter adapter)
unsubscribe
void unsubscribe(org.eclipse.emf.ecore.EObject eObject,
org.eclipse.emf.common.notify.Adapter adapter)
hasSubscription
boolean hasSubscription(CDOID id)
getStateLock
java.util.concurrent.locks.ReentrantLock getStateLock()
- Each time CDORevision or CDOState of an CDOObject is modified, ensure that no concurrent access is modifying it at
the same time. Uses
getStateLock() to be thread safe.
In the case where CDOObject.cdoRevision() or CDOObject.cdoState() is called without using this
lock, it is not guarantee that the state didn't change immediately after.
if (cdoObject.cdoState() != CDOState.PROXY)
{
// At this point could be a proxy!
cdoObject.cdoRevision();
}
The reason were we didn't use CDOView.getLock() is to not allow the access of that lock to the users since
it is very critical. Instead of giving this API to the end-users, a better API should be given in the CDOObject to
give them want they need.