Package org.eclipse.emf.cdo.session

## Interface CDOSession.Options

- All Superinterfaces:
    `CDOCommonSession.Options`, `org.eclipse.net4j.util.event.INotifier`, `org.eclipse.net4j.util.options.IOptions`
  All Known Subinterfaces:
    `CDONet4jSession.Options`, `CDOSession.Options`
  Enclosing interface:
    CDOSession

      public static interface CDOSession.Options
      extends CDOCommonSession.Options

  Encapsulates a set of notifying `session` configuration options.

  The session options can fire the following events:

  - `CDOSession.Options.GeneratedPackageEmulationEvent` after the `generated package emulation mode` has changed.
  - `CDOSession.Options.CollectionLoadingPolicyEvent` after the `collection loading policy` has changed.
  - `CDOSession.Options.LobCacheEvent` after the `large object cache` has changed.
  Author:
    Simon McDuff
  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 interface` | `CDOSession.Options.CollectionLoadingPolicyEvent` | An `options event` fired when the `collection loading policy` option of a `session` has changed.
    `static interface` | `CDOSession.Options.DelegableViewLockEvent` | An `options event` fired when the `delegable view lock enabled` option of a `session` has changed.
    `static interface` | `CDOSession.Options.GeneratedPackageEmulationEvent` | An `options event` fired when the `generated package emulation enabled` option of a `session` has changed.
    `static interface` | `CDOSession.Options.LobCacheEvent` | An `options event` fired when the `large object cache` option of a `session` has changed.
    `static interface` | `CDOSession.Options.PermissionUpdaterEvent` | An `options event` fired when the `permission updater` option of a `session` has changed.

    - ### Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.common.CDOCommonSession.Options

      `CDOCommonSession.Options.LockNotificationEvent, CDOCommonSession.Options.LockNotificationMode, CDOCommonSession.Options.LockNotificationModeEvent, CDOCommonSession.Options.PassiveUpdateEvent, CDOCommonSession.Options.PassiveUpdateMode`

    - ### Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier

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

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CDOCollectionLoadingPolicy` | `getCollectionLoadingPolicy()` | The `collection loading policy` of this `session` controls how a list gets populated.
    `CDOSession` | `getContainer()` | Returns the `session` of this options object.
    `CDOLobStore` | `getLobCache()` | Returns the `large object cache` currently being used by this session.
    `CDOPermissionUpdater` | `getPermissionUpdater()` | Returns the `permission updater` currently being used by this session.
    `boolean` | `isDelegableViewLockEnabled()` |
    `boolean` | `isGeneratedPackageEmulationEnabled()` |
    `void` | `setCollectionLoadingPolicy​(CDOCollectionLoadingPolicy policy)` | Sets the `collection loading` to be used by this session.
    `void` | `setDelegableViewLockEnabled​(boolean delegableViewLockEnabled)` | This method is useful, for example, if EMF `adapters` call `Display.syncExec()` in response to CDO notifications.
    `void` | `setGeneratedPackageEmulationEnabled​(boolean generatedPackageEmulationEnabled)` |
    `void` | `setLobCache​(CDOLobStore lobCache)` | Sets the `large object cache` to be used by this session.
    `void` | `setPermissionUpdater​(CDOPermissionUpdater permissionUpdater)` | Sets the `permission updater` to be used by this session.

    - ### Methods inherited from interface org.eclipse.emf.cdo.common.CDOCommonSession.Options

      `getLockNotificationMode, getPassiveUpdateMode, isLockNotificationEnabled, isPassiveUpdateEnabled, setLockNotificationEnabled, setLockNotificationMode, setPassiveUpdateEnabled, setPassiveUpdateMode`

    - ### Methods inherited from interface org.eclipse.net4j.util.event.INotifier

      `addListener, getListeners, hasListeners, removeListener`

- - ### Method Detail

    - #### getContainer

          CDOSession getContainer()

      Returns the `session` of this options object.
      Specified by:
        `getContainer` in interface `CDOCommonSession.Options`
      Specified by:
        `getContainer` in interface `org.eclipse.net4j.util.options.IOptions`
      Since:
        4.0

    - #### isGeneratedPackageEmulationEnabled

          boolean isGeneratedPackageEmulationEnabled()

    - #### setGeneratedPackageEmulationEnabled

          void setGeneratedPackageEmulationEnabled​(boolean generatedPackageEmulationEnabled)

    - #### getCollectionLoadingPolicy

          CDOCollectionLoadingPolicy getCollectionLoadingPolicy()

      The `collection loading policy` of this `session` controls how a list gets populated. By default, when an object is fetched, all its elements are filled with the proper values.

      This could be time-consuming, especially if the reference list does not need to be accessed. In CDO it is possible to partially load collections. The default list implementation that is shipped with CDO makes a distinction between the two following situations:

      1. How many CDOIDs to fill when an object is loaded for the first time;
      2. Which elements to fill with CDOIDs when the accessed element is not yet filled.
      Example:

      `CDOUtil.createCollectionLoadingPolicy(initialElements, subsequentElements);`

      The user can also provide its own implementation of the CDOCollectionLoadingPolicy interface.

    - #### setCollectionLoadingPolicy

          void setCollectionLoadingPolicy​(CDOCollectionLoadingPolicy policy)

      Sets the `collection loading` to be used by this session.

    - #### getLobCache

          CDOLobStore getLobCache()

      Returns the `large object cache` currently being used by this session.
      Since:
        4.0

    - #### setLobCache

          void setLobCache​(CDOLobStore lobCache)

      Sets the `large object cache` to be used by this session.
      Since:
        4.0

    - #### getPermissionUpdater

          CDOPermissionUpdater getPermissionUpdater()

      Returns the `permission updater` currently being used by this session.
      Since:
        4.3

    - #### setPermissionUpdater

          void setPermissionUpdater​(CDOPermissionUpdater permissionUpdater)

      Sets the `permission updater` to be used by this session.
      Since:
        4.3

    - #### isDelegableViewLockEnabled

          boolean isDelegableViewLockEnabled()

      Since:
        4.5

    - #### setDelegableViewLockEnabled

          void setDelegableViewLockEnabled​(boolean delegableViewLockEnabled)

      This method is useful, for example, if EMF `adapters` call `Display.syncExec()` in response to CDO notifications. In these cases a `DelegableReentrantLock` can be injected into the new `view`, which does not deadlock when both CDO's invalidation thread and the display thread acquire the view lock.
      Since:
        4.5
      See Also:
        `CDOUtil.setNextViewLock(Lock)`