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 inheritedviewmanagement functions.A session has the following responsibilities:
Note that in order to retrieve, access and store
objectsaviewis needed. The variousopenXYZmethods are provided for this purpose.A session can fire the following events:
-
CDOSessionInvalidationEventaftercommit notificationshave been received and processed. -
CDOSessionLocksChangedEventafterlockshave been acquired or released.
- 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
Nested Classes Modifier and Type Interface Description static interfaceCDOSession.ExceptionHandlerHandlesprotocolexceptions ifconfiguredbefore the session has been opened.static interfaceCDOSession.OptionsEncapsulates a set of notifyingsessionconfiguration options.-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.container.IContainer
org.eclipse.net4j.util.container.IContainer.Modifiable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistable<E extends java.lang.Object>, org.eclipse.net4j.util.container.IContainer.Persistence<E extends java.lang.Object>
-
-
Field Summary
-
Fields inherited from interface org.eclipse.emf.cdo.util.CDOUpdatable
NO_TIMEOUT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidchangeCredentials()Deprecated.As of 4.13 usechangeServerPassword().char[]changeServerPassword()Initiates (possibly interactive) changing of credentials for the user logged in in this session.CDOChangeSetDatacompareRevisions(CDOBranchPoint source, CDOBranchPoint target)CDOBranchManagergetBranchManager()Returns the CDObranch managerthat manages thebranchesof the repository of this session.CDOCommitInfoManagergetCommitInfoManager()Returns the CDOcommit info managerof this session.CDOSession.ExceptionHandlergetExceptionHandler()Returns theexception handlerof this session.CDOFetchRuleManagergetFetchRuleManager()Returns the CDOfetch rule managerof this session.CDOIDGeneratorgetIDGenerator()Returns the CDOID generatorof this session.CDOPackageRegistrygetPackageRegistry()CDORemoteSessionManagergetRemoteSessionManager()Returns the CDOremote session managerthat keeps track of the other remote sessions served by the repository of this local session.CDORepositoryInfogetRepositoryInfo()Returns an instance ofCDORepositoryInfothat describes the model repository thissessionis connected to.CDORevisionManagergetRevisionManager()Returns the CDOrevision managerthat manages therevisionsof the repository of this session.CDOBlobnewBlob(byte[] contents)CDOBlobnewBlob(java.io.InputStream contents)CDOClobnewClob(java.io.Reader contents)CDOClobnewClob(java.lang.String contents)CDOSession.Optionsoptions()Returns theoptionsof this session.longrefresh()Refreshes the object caches of all (non-historical)views.longrefresh(CDOSessionProtocol.RefreshSessionResult.Provider provider)voidwaitForUpdate(long updateTime)Equivalent to callingCDOUpdatable.waitForUpdate(long)on each of this session's views.booleanwaitForUpdate(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.core.runtime.IAdaptable
getAdapter
-
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
-
-
-
Method Detail
-
getRepositoryInfo
CDORepositoryInfo getRepositoryInfo()
Returns an instance ofCDORepositoryInfothat describes the model repository thissessionis connected to.- Since:
- 3.0
-
getPackageRegistry
CDOPackageRegistry getPackageRegistry()
Returns the EMFpackage registrythat is used by allobjectsof allviewsof this session.This registry is managed by the
package unit managerof this session. Allpackagesthat 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 managerthat manages thebranchesof the repository of this session.- Since:
- 3.0
-
getRevisionManager
CDORevisionManager getRevisionManager()
Returns the CDOrevision managerthat manages therevisionsof the repository of this session.- Since:
- 3.0
-
getFetchRuleManager
CDOFetchRuleManager getFetchRuleManager()
Returns the CDOfetch rule managerof this session.- Since:
- 3.0
-
getRemoteSessionManager
CDORemoteSessionManager getRemoteSessionManager()
Returns the CDOremote session managerthat keeps track of the other remote sessions served by the repository of this local session.
-
getCommitInfoManager
CDOCommitInfoManager getCommitInfoManager()
Returns the CDOcommit info managerof this session.- Since:
- 3.0
-
getExceptionHandler
CDOSession.ExceptionHandler getExceptionHandler()
Returns theexception handlerof this session.
-
getIDGenerator
CDOIDGenerator getIDGenerator()
Returns the CDOID generatorof this session.- Since:
- 4.1
-
refresh
long refresh()
Refreshes the object caches of all (non-historical)views.- Since:
- 3.0
-
refresh
long refresh(CDOSessionProtocol.RefreshSessionResult.Provider provider)
- 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:
waitForUpdatein interfaceCDOUpdatable
-
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:
waitForUpdatein interfaceCDOUpdatable- Returns:
trueif the specified commit operation has occurred within the given timeout period,falseotherwise.
-
compareRevisions
CDOChangeSetData compareRevisions(CDOBranchPoint source, CDOBranchPoint target)
- Since:
- 4.0
-
changeCredentials
@Deprecated void 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:
java.lang.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:
java.lang.UnsupportedOperationException- if the session implementation does not permit changing credentials- Since:
- 4.13
- See Also:
IPasswordCredentialsProvider.Provider.getCredentialsProvider()
-
newClob
CDOClob newClob(java.io.Reader contents) throws java.io.IOException
- Throws:
java.io.IOException- Since:
- 4.13
-
newClob
CDOClob newClob(java.lang.String contents) throws java.io.IOException
- Throws:
java.io.IOException- Since:
- 4.13
-
newBlob
CDOBlob newBlob(java.io.InputStream contents) throws java.io.IOException
- Throws:
java.io.IOException- Since:
- 4.13
-
newBlob
CDOBlob newBlob(byte[] contents) throws java.io.IOException
- Throws:
java.io.IOException- Since:
- 4.13
-
options
CDOSession.Options options()
Returns theoptionsof this session.- Specified by:
optionsin interfaceCDOCommonSession- Specified by:
optionsin interfaceorg.eclipse.net4j.util.options.IOptionsContainer
-
-