org.eclipse.emf.cdo.session
Interface CDOSession

All Superinterfaces:
CDOCommonSession, org.eclipse.net4j.util.collection.Closeable, org.eclipse.net4j.util.container.IContainer<CDOView>, org.eclipse.net4j.util.event.INotifier, org.eclipse.net4j.util.options.IOptionsContainer, org.eclipse.net4j.util.security.IUserAware
All Known Subinterfaces:
CDOSession, InternalCDOSession

public interface CDOSession
extends CDOCommonSession, org.eclipse.net4j.util.container.IContainer<CDOView>, org.eclipse.net4j.util.options.IOptionsContainer

Represents and controls the connection to a model repository.

A session has the following responsibilities:

Note that, in order to retrieve, access and store objects a view is needed. The various openXYZ methods are provided for this purpose.

Since:
2.0

Nested Class Summary
static interface CDOSession.ExceptionHandler
           
static interface CDOSession.Options
           
static interface CDOSession.Repository
          Describes a model repository a session is connected to.
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
org.eclipse.net4j.util.container.IContainer.Modifiable<E>
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.Introspection
 
Method Summary
 CDOSession.ExceptionHandler getExceptionHandler()
           
 CDOPackageRegistry getPackageRegistry()
          Returns the EMF package registry that is used by all objects of all views of this session.
 CDORemoteSessionManager getRemoteSessionManager()
          Returns the CDO remote session manager that keeps track of the other remote sessions served by the repository of this local session.
 CDORevisionManager getRevisionManager()
          Returns the CDO revision manager that manages the revisions of the repository of this session.
 CDOView[] getViews()
          Returns an array of all open views, transactions and audits of this session.
 CDOAudit openAudit(long timeStamp)
          Opens and returns a new audit on a new EMF resource set.
 CDOAudit openAudit(org.eclipse.emf.ecore.resource.ResourceSet resourceSet, long timeStamp)
          Opens and returns a new audit on the given EMF resource set.
 CDOTransaction openTransaction()
          Opens and returns a new transaction on a new EMF resource set.
 CDOTransaction openTransaction(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
          Opens and returns a new transaction on the given EMF resource set.
 CDOView openView()
          Opens and returns a new view on a new EMF resource set.
 CDOView openView(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
          Opens and returns a new view on the given EMF resource set.
 CDOSession.Options options()
          Returns the options of this session.
 java.util.Collection<CDOTimeStampContext> refresh()
          Refreshes the objects cache.
 CDOSession.Repository repository()
          Returns an instance of CDOSession.Repository that describes the model repository this session is connected to.
 
Methods inherited from interface org.eclipse.emf.cdo.common.CDOCommonSession
getSessionID, getView
 
Methods inherited from interface org.eclipse.net4j.util.security.IUserAware
getUserID
 
Methods inherited from interface org.eclipse.net4j.util.collection.Closeable
close, isClosed
 
Methods inherited from interface org.eclipse.net4j.util.container.IContainer
getElements, isEmpty
 
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, removeListener
 

Method Detail

getPackageRegistry

CDOPackageRegistry getPackageRegistry()
Returns the EMF package registry that is used by all objects of all views of this session.

This registry is managed by the package unit manager of this session. All packages that are already persisted in the repository of this session are automatically registered with this registry. New packages can be locally registered with this registry and are committed to the repository through a transaction, if needed.

See Also:
#getPackageUnitManager()

getRevisionManager

CDORevisionManager getRevisionManager()
Returns the CDO revision manager that manages the revisions of the repository of this session.


getRemoteSessionManager

CDORemoteSessionManager getRemoteSessionManager()
Returns the CDO remote session manager that keeps track of the other remote sessions served by the repository of this local session.


openTransaction

CDOTransaction openTransaction(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Opens and returns a new transaction on the given EMF resource set.

See Also:
openTransaction()

openTransaction

CDOTransaction openTransaction()
Opens and returns a new transaction on a new EMF resource set.

Same as calling openTransaction(new ResourceSetImpl()).

See Also:
openTransaction(ResourceSet)

openView

CDOView openView(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Opens and returns a new view on the given EMF resource set.

See Also:
openView()

openView

CDOView openView()
Opens and returns a new view on a new EMF resource set.

Same as calling openView(new ResourceSetImpl()).

See Also:
openView(ResourceSet)

openAudit

CDOAudit openAudit(org.eclipse.emf.ecore.resource.ResourceSet resourceSet,
                   long timeStamp)
Opens and returns a new audit on the given EMF resource set.

See Also:
#openAudit()

openAudit

CDOAudit openAudit(long timeStamp)
Opens and returns a new audit on a new EMF resource set.

Same as calling openAudit(new ResourceSetImpl(), timeStamp).

See Also:
openAudit(ResourceSet, long)

getViews

CDOView[] getViews()
Returns an array of all open views, transactions and audits of this session.

Specified by:
getViews in interface CDOCommonSession
See Also:
openView(), openTransaction(), openAudit(long)

refresh

java.util.Collection<CDOTimeStampContext> refresh()
Refreshes the objects cache.

Takes CDOID and version of all objects in the cache and sends it to the server. CDOTimeStampContext contains informations of which objects changed/detached. The collection is ordered by timestamp. In the case where #isPassiveUpdateEnabled() is true, this method will return immediately without doing anything.


getExceptionHandler

CDOSession.ExceptionHandler getExceptionHandler()

options

CDOSession.Options options()
Returns the options of this session.

Specified by:
options in interface CDOCommonSession
Specified by:
options in interface org.eclipse.net4j.util.options.IOptionsContainer

repository

CDOSession.Repository repository()
Returns an instance of CDOSession.Repository that describes the model repository this session is connected to.


Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
All Rights Reserved.