org.eclipse.emf.cdo.session
Interface CDOSession

All Superinterfaces:
CDOCommonSession, CDOUpdatable, Closeable, IContainer<CDOView>, INotifier, IOptionsContainer, IUserAware
All Known Subinterfaces:
CDOSession, CDOSession, InternalCDOSession

public interface CDOSession
extends CDOCommonSession, CDOUpdatable, IContainer<CDOView>

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
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.

Nested Class Summary
static interface CDOSession.ExceptionHandler
          Handles protocol exceptions if configured before the session has been opened.
static interface CDOSession.Options
          Encapsulates a set of notifying session configuration options.
 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
IContainer.Modifiable<E>
 
Field Summary
 
Fields inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable
NO_TIMEOUT
 
Method Summary
 CDOChangeSetData compareRevisions(CDOBranchPoint source, CDOBranchPoint target)
           
 CDOBranchManager getBranchManager()
          Returns the CDO branch manager that manages the branches of the repository of this session.
 CDOCommitInfoManager getCommitInfoManager()
          Returns the CDO commit info manager of this session.
 CDOSession.ExceptionHandler getExceptionHandler()
           
 CDOFetchRuleManager getFetchRuleManager()
           
 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.
 CDORepositoryInfo getRepositoryInfo()
          Returns an instance of CDORepositoryInfo that describes the model repository this session is connected to.
 CDORevisionManager getRevisionManager()
          Returns the CDO revision manager that manages the revisions of the repository of this session.
 CDOView getView(int viewID)
           
 CDOView[] getViews()
          Returns an array of all open views and transactions of this session.
 CDOTransaction openTransaction()
          Opens and returns a new transaction on a new EMF resource set.
 CDOTransaction openTransaction(CDOBranch branch)
          Opens and returns a new transaction on a new EMF resource set.
 CDOTransaction openTransaction(CDOBranchPoint target)
          Opens and returns a new transaction on a new EMF resource set.
 CDOTransaction openTransaction(CDOBranchPoint target, ResourceSet resourceSet)
          Opens and returns a new transaction on the given EMF resource set.
 CDOTransaction openTransaction(CDOBranch branch, ResourceSet resourceSet)
          Opens and returns a new transaction on the given EMF resource set.
 CDOTransaction openTransaction(ResourceSet resourceSet)
          Opens and returns a new transaction on the given EMF resource set.
 CDOTransaction openTransaction(String durableLockingID)
          Opens and returns a transaction on a new EMF resource set by resuming a transaction that has previously been made durable by calling CDOTransaction.enableDurableLocking(true).
 CDOTransaction openTransaction(String durableLockingID, ResourceSet resourceSet)
          Opens and returns a transaction on the given EMF resource set by resuming a transaction that has previously been made durable by calling CDOTransaction.enableDurableLocking(true).
 CDOView openView()
          Opens and returns a new view on a new EMF resource set.
 CDOView openView(CDOBranch branch)
          Opens and returns a new view on a new EMF resource set.
 CDOView openView(CDOBranch branch, long timeStamp)
          Opens and returns a new view on a new EMF resource set.
 CDOView openView(CDOBranch branch, long timeStamp, ResourceSet resourceSet)
          Opens and returns a new view on the given EMF resource set.
 CDOView openView(CDOBranchPoint target)
          Opens and returns a new view on a new EMF resource set.
 CDOView openView(CDOBranchPoint target, ResourceSet resourceSet)
          Opens and returns a new view on the given EMF resource set.
 CDOView openView(long timeStamp)
          Opens and returns a new view on a new EMF resource set.
 CDOView openView(ResourceSet resourceSet)
          Opens and returns a new view on the given EMF resource set.
 CDOView openView(String durableLockingID)
          Opens and returns a view on a new EMF resource set by resuming a view that has previously been made durable by calling CDOView.enableDurableLocking(true).
 CDOView openView(String durableLockingID, ResourceSet resourceSet)
          Opens and returns a view on the given EMF resource set by resuming a view that has previously been made durable by calling CDOView.enableDurableLocking(true).
 CDOSession.Options options()
          Returns the options of this session.
 long refresh()
          Refreshes the object caches of all (non-historical) views.
 void waitForUpdate(long updateTime)
          Equivalent to calling CDOUpdatable.waitForUpdate(long) on each of this session's views.
 boolean waitForUpdate(long updateTime, long timeoutMillis)
          Equivalent to calling CDOUpdatable.waitForUpdate(long) on each of this session's views.
 
Methods inherited from interface org.eclipse.emf.cdo.common.CDOCommonSession
getSessionID
 
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.emf.cdo.util.CDOUpdatable
getLastUpdateTime
 
Methods inherited from interface org.eclipse.net4j.util.container.IContainer
getElements, isEmpty
 
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
 

Method Detail

getRepositoryInfo

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

Since:
3.0

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.


getBranchManager

CDOBranchManager getBranchManager()
Returns the CDO branch manager that manages the branches of the repository of this session.

Since:
3.0

getRevisionManager

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

Since:
3.0

getFetchRuleManager

CDOFetchRuleManager getFetchRuleManager()
Since:
3.0

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.


getCommitInfoManager

CDOCommitInfoManager getCommitInfoManager()
Returns the CDO commit info manager of this session.

Since:
3.0

getExceptionHandler

CDOSession.ExceptionHandler getExceptionHandler()

openTransaction

CDOTransaction openTransaction(CDOBranchPoint target,
                               ResourceSet resourceSet)
Opens and returns a new transaction on the given EMF resource set.

Since:
4.0
See Also:
openTransaction()

openTransaction

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

Since:
4.0
See Also:
openTransaction()

openTransaction

CDOTransaction openTransaction(CDOBranch branch,
                               ResourceSet resourceSet)
Opens and returns a new transaction on the given EMF resource set.

Since:
3.0
See Also:
openTransaction()

openTransaction

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

Since:
3.0
See Also:
openTransaction()

openTransaction

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

Same as calling openTransaction(new ResourceSetImpl()).

Since:
3.0
See Also:
openTransaction(ResourceSet)

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)

openTransaction

CDOTransaction openTransaction(String durableLockingID)
Opens and returns a transaction on a new EMF resource set by resuming a transaction that has previously been made durable by calling CDOTransaction.enableDurableLocking(true).

Same as calling openTransaction(durableLockingID, new ResourceSetImpl()).

Since:
4.0
See Also:
openTransaction(String,ResourceSet)

openTransaction

CDOTransaction openTransaction(String durableLockingID,
                               ResourceSet resourceSet)
Opens and returns a transaction on the given EMF resource set by resuming a transaction that has previously been made durable by calling CDOTransaction.enableDurableLocking(true).

Since:
4.0
See Also:
openTransaction(String)

openView

CDOView openView(CDOBranchPoint target,
                 ResourceSet resourceSet)
Opens and returns a new view on the given EMF resource set.

Since:
4.0
See Also:
openView()

openView

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

Since:
4.0
See Also:
openView()

openView

CDOView openView(CDOBranch branch,
                 long timeStamp,
                 ResourceSet resourceSet)
Opens and returns a new view on the given EMF resource set.

Since:
3.0
See Also:
openView()

openView

CDOView openView(CDOBranch branch,
                 long timeStamp)
Opens and returns a new view on a new EMF resource set.

Same as calling openView(new ResourceSetImpl()).

Since:
3.0
See Also:
openView(CDOBranch, long, ResourceSet)

openView

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

Same as calling openView(new ResourceSetImpl()).

Since:
3.0
See Also:
openView(CDOBranch, long, ResourceSet)

openView

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

Same as calling openView(new ResourceSetImpl()).

Since:
3.0
See Also:
openView(CDOBranch, long, ResourceSet)

openView

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

Since:
4.0
See Also:
openView(CDOBranch, long, ResourceSet)

openView

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

Same as calling openView(new ResourceSetImpl()).

See Also:
openView(CDOBranch, long, ResourceSet)

openView

CDOView openView(String durableLockingID)
Opens and returns a view on a new EMF resource set by resuming a view that has previously been made durable by calling CDOView.enableDurableLocking(true).

Same as calling openView(durableLockingID, new ResourceSetImpl()).

Since:
4.0
See Also:
openView(String,ResourceSet)

openView

CDOView openView(String durableLockingID,
                 ResourceSet resourceSet)
Opens and returns a view on the given EMF resource set by resuming a view that has previously been made durable by calling CDOView.enableDurableLocking(true).

Since:
4.0
See Also:
openView(String)

getViews

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

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

getView

CDOView getView(int viewID)
Specified by:
getView in interface CDOCommonSession
Since:
4.0

refresh

long refresh()
Refreshes the object caches of all (non-historical) views.

Since:
3.0

waitForUpdate

void waitForUpdate(long updateTime)
Equivalent to calling CDOUpdatable.waitForUpdate(long) on each of this session's views. That is, this blocks the calling thread until all of this session's views have incorporated a commit operation with the given time stamp (or higher).

Specified by:
waitForUpdate in interface CDOUpdatable

waitForUpdate

boolean waitForUpdate(long updateTime,
                      long timeoutMillis)
Equivalent to calling CDOUpdatable.waitForUpdate(long) on each of this session's views. That is, this blocks the calling thread until all of this session's views have incorporated a commit operation with the given time stamp (or higher) or the given total timeout has expired.

Specified by:
waitForUpdate in interface CDOUpdatable
Returns:
true if the specified commit operation has occured within the given timeout period, false otherwise.

compareRevisions

CDOChangeSetData compareRevisions(CDOBranchPoint source,
                                  CDOBranchPoint target)
Since:
4.0

options

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

Specified by:
options in interface CDOCommonSession
Specified by:
options in interface IOptionsContainer


Copyright (c) 2004 - 2011 Eike Stepper (Berlin, Germany) and others.