Package org.eclipse.emf.cdo.session

# Schnittstelle CDOSession

Alle Superschnittstellen:
  `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`

Alle bekannten Unterschnittstellen:
  `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` after `commit notifications` have been received and processed.
- `CDOSessionLocksChangedEvent` after `locks` have been acquired or released.
- `CDOSessionPermissionsChangedEvent` after `revision permissions` have changed.

Seit:
  2.0
Autor:
  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.

## Verschachtelte Klassen - Übersicht

Verschachtelte Klassen
Modifizierer und Typ
Schnittstelle
Beschreibung
`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.

## Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.container.IContainer

`org.eclipse.net4j.util.container.IContainer.Modifiable<E>, org.eclipse.net4j.util.container.IContainer.Persistable<E>, org.eclipse.net4j.util.container.IContainer.Persistence<E>`

## Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.net4j.util.event.INotifier

`org.eclipse.net4j.util.event.INotifier.INotifier2`

## Feldübersicht

### Von Schnittstelle geerbte Felder org.eclipse.emf.cdo.util.CDOUpdatable

`NO_TIMEOUT`

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`void`
`changeCredentials()`
Veraltet.
As of 4.13 use `changeServerPassword()`.
`char[]`
`changeServerPassword()`
Initiates (possibly interactive) changing of credentials for the user logged in in this session.
`Map<String,org.eclipse.net4j.util.collection.Entity>`
`clientEntities()`
`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()`
Returns the `exception handler` of this session.
`CDOFetchRuleManager`
`getFetchRuleManager()`
Returns the CDO `fetch rule manager` of this session.
`CDOIDGenerator`
`getIDGenerator()`
Returns the CDO `ID generator` of this session.
`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.
`CDOUserInfoManager`
`getUserInfoManager()`
`CDOBlob`
`newBlob(byte[] contents)`
`CDOBlob`
`newBlob(InputStream contents)`
`CDOClob`
`newClob(Reader contents)`
`CDOClob`
`newClob(String contents)`
`CDOSession.Options`
`options()`
Returns the `options` of this session.
`long`
`refresh()`
Refreshes the object caches of all (non-historical) `views`.
`long`
`refresh(CDOSessionProtocol.RefreshSessionResult.Provider provider)`
`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.

### Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.common.CDOCommonSession

`authorizeOperations, getOpeningTime, getSessionID, getView, getViews`

### Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.transaction.CDOTransactionContainer

`getTransaction, getTransactions, getTransactions, openTransaction, openTransaction, openTransaction, openTransaction, openTransaction, openTransaction`

### Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.transaction.CDOTransactionOpener

`openTransaction, openTransaction`

### Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.util.CDOUpdatable

`getLastUpdateTime, runAfterUpdate`

### Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.view.CDOViewContainer

`getView, getViews, getViews, openView, openView, openView, openView, openView, openView, openView, openView`

### Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.view.CDOViewOpener

`openView, openView`

### Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.collection.Closeable

`close, isClosed`

### Von Schnittstelle geerbte Methoden org.eclipse.core.runtime.IAdaptable

`getAdapter`

### Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.container.IContainer

`getElements, isEmpty`

### Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.event.INotifier

`addListener, getListeners, hasListeners, removeListener`

### Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.security.IPasswordCredentialsProvider.Provider

`getCredentialsProvider`

### Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.properties.IPropertiesContainer

`properties`

### Von Schnittstelle geerbte Methoden org.eclipse.net4j.util.security.IUserAware

`getUserID`

## Methodendetails

### getRepositoryInfo

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

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

Angegeben von:
  `getBranchManager` in Schnittstelle `CDOCommonSession`
Seit:
  3.0

### getRevisionManager

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

Angegeben von:
  `getRevisionManager` in Schnittstelle `CDOCommonSession`
Seit:
  3.0

### getFetchRuleManager

CDOFetchRuleManager getFetchRuleManager()
Returns the CDO `fetch rule manager` of this session.

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

Angegeben von:
  `getCommitInfoManager` in Schnittstelle `CDOCommonSession`
Seit:
  3.0

### getUserInfoManager

CDOUserInfoManager getUserInfoManager()

Seit:
  4.26

### getExceptionHandler

CDOSession.ExceptionHandler getExceptionHandler()
Returns the `exception handler` of this session.

### getIDGenerator

CDOIDGenerator getIDGenerator()
Returns the CDO `ID generator` of this session.

Seit:
  4.1

### refresh

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

Seit:
  3.0

### refresh

long refresh(CDOSessionProtocol.RefreshSessionResult.Provider provider)

Seit:
  4.4

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

Angegeben von:
  `waitForUpdate` in Schnittstelle `CDOUpdatable`
Parameter:
  `updateTime` - the time stamp of the update to wait for in milliseconds since Unix epoch.

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

Angegeben von:
  `waitForUpdate` in Schnittstelle `CDOUpdatable`
Parameter:
  `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, or `CDOUpdatable.NO_TIMEOUT` to wait indefinitely.
Gibt zurück:
  `true` if the update occurred within the specified timeout period, `false` otherwise.

### compareRevisions

CDOChangeSetData compareRevisions(CDOBranchPoint source, CDOBranchPoint target)

Seit:
  4.0

### changeCredentials

@Deprecated void changeCredentials()
Veraltet.
As of 4.13 use `changeServerPassword()`.
Initiates (possibly interactive) changing of credentials for the user logged in in this session. This is an optional operation of the session.

Löst aus:
  `UnsupportedOperationException` - if the session implementation does not permit changing credentials
Seit:
  4.3
Siehe auch:
  - `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.

Löst aus:
  `UnsupportedOperationException` - if the session implementation does not permit changing credentials
Seit:
  4.13
Siehe auch:
  - `IPasswordCredentialsProvider.Provider.getCredentialsProvider()`

### newClob

CDOClob newClob(Reader contents) throws IOException

Löst aus:
  `IOException`
Seit:
  4.13

### newClob

CDOClob newClob(String contents) throws IOException

Löst aus:
  `IOException`
Seit:
  4.13

### newBlob

CDOBlob newBlob(InputStream contents) throws IOException

Löst aus:
  `IOException`
Seit:
  4.13

### newBlob

CDOBlob newBlob(byte[] contents) throws IOException

Löst aus:
  `IOException`
Seit:
  4.13

### clientEntities

Map<String,org.eclipse.net4j.util.collection.Entity> clientEntities()

Seit:
  4.27

### options

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

Angegeben von:
  `options` in Schnittstelle `CDOCommonSession`
Angegeben von:
  `options` in Schnittstelle `org.eclipse.net4j.util.options.IOptionsContainer`