Interface InternalCDOView

All Superinterfaces:
AutoCloseable, CDOBranchPoint, CDOBranchProvider, CDOCommitHistory.Provider<CDOObject, CDOObjectHistory>, CDOCommonView, CDOIDProvider, CDOLobLoader, CDORevisionProvider, CDOTimeProvider, CDOUpdatable, CDOView, org.eclipse.net4j.util.collection.Closeable, IAdaptable, org.eclipse.net4j.util.container.IContainer<CDOResourceNode>, org.eclipse.net4j.util.lifecycle.IDeactivateable, org.eclipse.net4j.util.concurrent.IExecutorServiceProvider, org.eclipse.net4j.util.lifecycle.ILifecycle, org.eclipse.net4j.util.event.INotifier, org.eclipse.net4j.util.options.IOptionsContainer, org.eclipse.net4j.util.properties.IPropertiesContainer
All Known Subinterfaces:
InternalCDOTransaction

public interface InternalCDOView extends CDOView, CDOIDProvider, CDOLobLoader, org.eclipse.net4j.util.lifecycle.ILifecycle, org.eclipse.net4j.util.concurrent.IExecutorServiceProvider
Internal contract for a repository view's object cache and invalidation lifecycle. A view uses it to resolve and load revisions for its branch point, while session invalidations update the objects and permissions visible through that view.
Since:
2.0
Author:
Eike Stepper
No Implement
This interface is not intended to be implemented by clients.
No Extend
This interface is not intended to be extended by clients.
  • Method Details

    • access

      org.eclipse.net4j.util.concurrent.Access access()
      Acquires this view's internal reentrant lock and returns a reusable lexical access handle. Close the returned handle exactly once for each successful acquisition.
      Since:
      4.31
    • isAccessHeldByCurrentThread

      boolean isAccessHeldByCurrentThread()
      Returns whether the current thread holds this view's access lock.
      Since:
      4.31
    • setViewID

      void setViewID(int viewId)
    • setProvider

      void setProvider(CDOViewProvider provider)
      Since:
      4.4
    • getRepositoryName

      String getRepositoryName()
      Since:
      4.4
    • setRepositoryName

      void setRepositoryName(String repositoryName)
      Since:
      4.4
    • 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:
    • 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:
    • setViewSet

      void setViewSet(InternalCDOViewSet viewSet)
    • getObjects

      Map<CDOID, InternalCDOObject> getObjects()
      Returns an unmodifiable map of the objects managed by this view.
      Since:
      4.0
    • getObjectsList

      List<InternalCDOObject> getObjectsList()
      Since:
      4.3
    • getStore

      CDOStore getStore()
      Since:
      4.0
    • toTransaction

      InternalCDOTransaction toTransaction()
    • attachResource

      void attachResource(CDOResourceImpl resource)
    • resourceLoaded

      void resourceLoaded(CDOResourceImpl resource, boolean loaded)
      Since:
      4.5
    • handleObjectStateChanged

      void handleObjectStateChanged(InternalCDOObject object, CDOState oldState, CDOState newState)
      Since:
      3.0
    • invalidate

      void invalidate(InternalCDOView.ViewInvalidationData invalidationData)
      Since:
      4.6
    • setLastUpdateTime

      void setLastUpdateTime(long lastUpdateTime)
      Since:
      3.0
    • collectViewedRevisions

      void collectViewedRevisions(Map<CDOID, InternalCDORevision> revisions)
      Since:
      3.0
    • tryCollectViewedRevisions

      boolean tryCollectViewedRevisions(Map<CDOID, InternalCDORevision> revisions)
      Collects viewed revisions without waiting for this view's access lock.
      Parameters:
      revisions - the map to populate with viewed revisions
      Returns:
      whether the lock was acquired and the view's revisions were collected
      Since:
      4.31
    • updateViewedRevision

      boolean updateViewedRevision(CDOID id, InternalCDORevision revision)
      Records the revision currently retained by an object in this view so that security updates can find it even when the view access lock is contended and the revision is no longer present in the revision cache.
      Parameters:
      id - the ID of the viewed object
      revision - the currently retained revision, or null if the object no longer retains a revision
      Returns:
      true if this view maintains viewed-revision tracking
      Since:
      4.31
    • synchronizeTrackedViewedRevisions

      Map<CDORevision, CDOPermission> synchronizeTrackedViewedRevisions(Map<CDOID, InternalCDORevision> sourceRevisions)
      Propagates permissions from revisions included in a completed permission update to same-key revisions that were installed in this view while the update was running.
      Parameters:
      sourceRevisions - the revisions whose permissions were included in the completed update, keyed by object ID
      Since:
      4.31
    • remapObject

      void remapObject(CDOID oldID)
    • clearResourcePathCacheIfNecessary

      void clearResourcePathCacheIfNecessary(CDORevisionDelta delta)
      Since:
      4.2
    • clearResourcePathCacheIfNecessaryUnsynced

      void clearResourcePathCacheIfNecessaryUnsynced(CDORevisionDelta delta)
      Clears the resource-path cache using the same logic as clearResourcePathCacheIfNecessary(CDORevisionDelta). This method does not acquire the view lock; the caller must already hold this view's internal lock. It is intended for internal call paths that are already inside the owning view/transaction synchronization boundary. A null delta clears the cache unconditionally; a non-null delta clears it only if it can affect the resource tree structure.
      Since:
      4.31
      See Also:
    • getResourceNodeID

      CDOID getResourceNodeID(String path)
    • registerObject

      void registerObject(InternalCDOObject object)
    • deregisterObject

      void deregisterObject(InternalCDOObject object)
    • getRevision

      InternalCDORevision getRevision(CDOID id, boolean loadOnDemand)
    • prefetchRevisions

      void prefetchRevisions(CDOID id, int depth)
      Since:
      3.0
    • convertObjectToID

      Object convertObjectToID(Object potentialObject)
    • convertObjectToID

      Object convertObjectToID(Object potentialObject, boolean onlyPersistedID)
    • convertObjectToIDUnsynced

      Object convertObjectToIDUnsynced(Object potentialObject, boolean onlyPersistedID)
      Performs the same conversion as convertObjectToID(Object, boolean) without acquiring this view's internal lock. The caller must already hold this view's internal lock. This method is intended for internal paths that are already inside the owning view synchronization boundary.
      Since:
      4.31
      See Also:
    • convertIDToObject

      Object convertIDToObject(Object potentialID)
    • convertIDToObjectUnsynced

      Object convertIDToObjectUnsynced(Object potentialID)
      Performs the same ID-to-object conversion as convertIDToObject(Object) without acquiring this view's internal lock. The caller must already hold this view's internal lock. This method is intended for internal paths that are already inside the owning view synchronization boundary.
      Since:
      4.31
      See Also:
    • isObjectNew

      boolean isObjectNew(CDOID id)
      Since:
      4.1
    • isObjectDirty

      boolean isObjectDirty(CDOID id)
      Since:
      4.31
    • isObjectDetached

      boolean isObjectDetached(CDOID id)
      Since:
      4.31
    • handleAddAdapter

      void handleAddAdapter(InternalCDOObject eObject, Adapter adapter)
    • handleRemoveAdapter

      void handleRemoveAdapter(InternalCDOObject eObject, Adapter adapter)
    • subscribe

      void subscribe(EObject eObject, Adapter adapter)
    • unsubscribe

      void unsubscribe(EObject eObject, Adapter adapter)
    • hasSubscription

      boolean hasSubscription(CDOID id)
    • getLockOwner

      CDOLockOwner getLockOwner()
      Specified by:
      getLockOwner in interface CDOCommonView
      Since:
      4.12
    • isObjectLocked

      boolean isObjectLocked(CDOObject object, org.eclipse.net4j.util.concurrent.IRWLockManager.LockType lockType, boolean byOthers)
      Since:
      3.0
    • handleLockNotification

      void handleLockNotification(InternalCDOView sender, CDOLockChangeInfo lockChangeInfo)
      Since:
      4.1
    • getViewAndState

      InternalCDOView.ViewAndState getViewAndState(CDOState state)
      Since:
      4.2
    • getViewMonitor

      @Deprecated Object getViewMonitor()
      Deprecated.
      As of 4.29 use CDOView.sync()
      Returns a per-view compatibility monitor. The monitor does not coordinate with CDO's internal view lock; use CDOView.sync() instead. This method is disabled by default and requires -Dorg.eclipse.emf.cdo.view.ENABLE_LEGACY_LOCKING_API=true.
      Since:
      4.5
    • lockView

      @Deprecated void lockView()
      Deprecated.
      As of 4.29 use CDOView.sync()
      Acquires the underlying view lock for deprecated compatibility code. This method is disabled by default and requires -Dorg.eclipse.emf.cdo.view.ENABLE_LEGACY_LOCKING_API=true. Use CDOView.sync() instead.
      Since:
      4.5
    • unlockView

      @Deprecated void unlockView()
      Deprecated.
      As of 4.29 use CDOView.sync()
      Since:
      4.5
    • isClosing

      boolean isClosing()
      Since:
      4.15
    • inverseClose

      void inverseClose()
      Since:
      4.15
    • getFeatureAnalyzer

      @Deprecated CDOFeatureAnalyzer getFeatureAnalyzer()
      Deprecated.
    • setFeatureAnalyzer

      @Deprecated void setFeatureAnalyzer(CDOFeatureAnalyzer featureAnalyzer)
      Deprecated.
    • invalidate

      @Deprecated void invalidate(CDOBranch branch, long lastUpdateTime, List<CDORevisionKey> allChangedObjects, List<CDOIDAndVersion> allDetachedObjects, Map<CDOID, InternalCDORevision> oldRevisions, boolean async)
    • invalidate

      @Deprecated void invalidate(CDOBranch branch, long lastUpdateTime, List<CDORevisionKey> allChangedObjects, List<CDOIDAndVersion> allDetachedObjects, Map<CDOID, InternalCDORevision> oldRevisions, boolean async, boolean clearResourcePathCache)
      Deprecated.
      Since:
      4.2
    • registerProxyResource

      @Deprecated void registerProxyResource(CDOResourceImpl resource)
      Deprecated.
      No longer supported.
    • updateLockStates

      @Deprecated void updateLockStates(CDOLockState[] newLockStates, boolean loadObjectsOnDemand, Consumer<CDOLockState> consumer)
      Since:
      4.12