Package org.eclipse.emf.cdo.session
Interface CDOSession
- All Superinterfaces:
CDOCommonSession
,CDOTransactionContainer
,CDOTransactionOpener
,CDOUpdatable
,CDOViewContainer
,CDOViewOpener
,org.eclipse.net4j.util.collection.Closeable
,IAdaptable
,org.eclipse.net4j.util.container.IContainer<CDOView>
,org.eclipse.net4j.util.event.INotifier
,org.eclipse.net4j.util.options.IOptionsContainer
,org.eclipse.net4j.util.security.IPasswordCredentialsProvider.Provider
,org.eclipse.net4j.util.properties.IPropertiesContainer
,org.eclipse.net4j.util.security.IUserAware
- All Known Subinterfaces:
CDONet4jSession
,CDOSession
,InternalCDOSession
public interface CDOSession
extends CDOCommonSession, CDOUpdatable, CDOTransactionContainer, org.eclipse.net4j.util.security.IPasswordCredentialsProvider.Provider
Represents and controls the connection to a model repository in addition to the inherited
view
management functions.
A session has the following responsibilities:
-
Repository information
-
Package registry
-
Branch management
-
Revision management
-
Fetch rule management
-
Commit information management
-
Exception handling
-
ID generation
-
View management
Note that in order to retrieve, access and store objects
a view
is needed. The
various openXYZ
methods are provided for this purpose.
A session can fire the following events:
-
CDOSessionInvalidationEvent
aftercommit notifications
have been received and processed. -
CDOSessionLocksChangedEvent
afterlocks
have been acquired or released. -
CDOSessionPermissionsChangedEvent
afterrevision permissions
have changed.
- 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
Modifier and TypeInterfaceDescriptionstatic interface
Handlesprotocol
exceptions ifconfigured
before the session has been opened.static interface
Encapsulates a set of notifyingsession
configuration options.Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
org.eclipse.net4j.util.container.IContainer.Modifiable<E extends Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends Object>
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2
-
Field Summary
Fields inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable
NO_TIMEOUT
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.char[]
Initiates (possibly interactive) changing of credentials for the user logged in in this session.compareRevisions
(CDOBranchPoint source, CDOBranchPoint target) Returns the CDObranch manager
that manages thebranches
of the repository of this session.Returns the CDOcommit info manager
of this session.Returns theexception handler
of this session.Returns the CDOfetch rule manager
of this session.Returns the CDOID generator
of this session.Returns the CDOremote session manager
that keeps track of the other remote sessions served by the repository of this local session.Returns an instance ofCDORepositoryInfo
that describes the model repository thissession
is connected to.Returns the CDOrevision manager
that manages therevisions
of the repository of this session.newBlob
(byte[] contents) newBlob
(InputStream contents) options()
Returns theoptions
of this session.long
refresh()
Refreshes the object caches of all (non-historical)views
.long
void
waitForUpdate
(long updateTime) Equivalent to callingCDOUpdatable.waitForUpdate(long)
on each of this session's views.boolean
waitForUpdate
(long updateTime, long timeoutMillis) Equivalent to callingCDOUpdatable.waitForUpdate(long)
on each of this session's views.Methods inherited from interface org.eclipse.emf.cdo.common.CDOCommonSession
authorizeOperations, getOpeningTime, getSessionID, getView, getViews
Methods inherited from interface org.eclipse.emf.cdo.transaction.CDOTransactionContainer
getTransaction, getTransactions, getTransactions, openTransaction, openTransaction, openTransaction, openTransaction, openTransaction, openTransaction
Methods inherited from interface org.eclipse.emf.cdo.transaction.CDOTransactionOpener
openTransaction, openTransaction
Methods inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable
getLastUpdateTime, runAfterUpdate
Methods inherited from interface org.eclipse.emf.cdo.view.CDOViewContainer
getView, getViews, getViews, openView, openView, openView, openView, openView, openView, openView, openView
Methods inherited from interface org.eclipse.emf.cdo.view.CDOViewOpener
openView, openView
Methods inherited from interface org.eclipse.net4j.util.collection.Closeable
close, isClosed
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
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
Methods inherited from interface org.eclipse.net4j.util.security.IPasswordCredentialsProvider.Provider
getCredentialsProvider
Methods inherited from interface org.eclipse.net4j.util.properties.IPropertiesContainer
properties
Methods inherited from interface org.eclipse.net4j.util.security.IUserAware
getUserID
-
Method Details
-
getRepositoryInfo
CDORepositoryInfo getRepositoryInfo()Returns an instance ofCDORepositoryInfo
that describes the model repository thissession
is connected to.- Since:
- 3.0
-
getPackageRegistry
CDOPackageRegistry getPackageRegistry()Returns the EMFpackage registry
that is used by allobjects
of allviews
of this session.This registry is managed by the
package unit manager
of this session. Allpackages
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 atransaction
, if needed. -
getBranchManager
CDOBranchManager getBranchManager()Returns the CDObranch manager
that manages thebranches
of the repository of this session.- Specified by:
getBranchManager
in interfaceCDOCommonSession
- Since:
- 3.0
-
getRevisionManager
CDORevisionManager getRevisionManager()Returns the CDOrevision manager
that manages therevisions
of the repository of this session.- Specified by:
getRevisionManager
in interfaceCDOCommonSession
- Since:
- 3.0
-
getFetchRuleManager
CDOFetchRuleManager getFetchRuleManager()Returns the CDOfetch rule manager
of this session.- Since:
- 3.0
-
getRemoteSessionManager
CDORemoteSessionManager getRemoteSessionManager()Returns the CDOremote session manager
that keeps track of the other remote sessions served by the repository of this local session. -
getCommitInfoManager
CDOCommitInfoManager getCommitInfoManager()Returns the CDOcommit info manager
of this session.- Specified by:
getCommitInfoManager
in interfaceCDOCommonSession
- Since:
- 3.0
-
getUserInfoManager
CDOUserInfoManager getUserInfoManager()- Since:
- 4.26
-
getExceptionHandler
CDOSession.ExceptionHandler getExceptionHandler()Returns theexception handler
of this session. -
getIDGenerator
CDOIDGenerator getIDGenerator()Returns the CDOID generator
of this session.- Since:
- 4.1
-
refresh
long refresh()Refreshes the object caches of all (non-historical)views
.- Since:
- 3.0
-
refresh
- Since:
- 4.4
-
waitForUpdate
void waitForUpdate(long updateTime) Equivalent to callingCDOUpdatable.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 interfaceCDOUpdatable
- Parameters:
updateTime
- the time stamp of the update to wait for in milliseconds since Unix epoch.
-
waitForUpdate
boolean waitForUpdate(long updateTime, long timeoutMillis) Equivalent to callingCDOUpdatable.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 interfaceCDOUpdatable
- Parameters:
updateTime
- the time stamp of the update to wait for in milliseconds since Unix epoch.timeoutMillis
- the maximum number of milliseconds to wait for the update to occur, orCDOUpdatable.NO_TIMEOUT
to wait indefinitely.- Returns:
true
if the update occurred within the specified timeout period,false
otherwise.
-
compareRevisions
- Since:
- 4.0
-
changeCredentials
Deprecated.As of 4.13 usechangeServerPassword()
.Initiates (possibly interactive) changing of credentials for the user logged in in this session. This is an optional operation of the session.- Throws:
UnsupportedOperationException
- if the session implementation does not permit changing credentials- Since:
- 4.3
- See Also:
-
IPasswordCredentialsProvider.Provider.getCredentialsProvider()
-
changeServerPassword
char[] changeServerPassword()Initiates (possibly interactive) changing of credentials for the user logged in in this session. This is an optional operation of the session.- Throws:
UnsupportedOperationException
- if the session implementation does not permit changing credentials- Since:
- 4.13
- See Also:
-
IPasswordCredentialsProvider.Provider.getCredentialsProvider()
-
newClob
- Throws:
IOException
- Since:
- 4.13
-
newClob
- Throws:
IOException
- Since:
- 4.13
-
newBlob
- Throws:
IOException
- Since:
- 4.13
-
newBlob
- Throws:
IOException
- Since:
- 4.13
-
options
CDOSession.Options options()Returns theoptions
of this session.- Specified by:
options
in interfaceCDOCommonSession
- Specified by:
options
in interfaceorg.eclipse.net4j.util.options.IOptionsContainer
-
changeServerPassword()
.