Package org.eclipse.emf.cdo.server

# Schnittstelle IStoreAccessor

Alle Superschnittstellen:
  `InternalCDOBranchManager.BranchLoader`, `InternalCDOCommitInfoManager.CommitInfoLoader`, `IQueryHandlerProvider`

Alle bekannten Unterschnittstellen:
  `IDBStoreAccessor`, `ILissomeStoreAccessor`, `IMongoDBStoreAccessor`, `IStoreAccessor.NewIDSupport`, `IStoreAccessor.Raw`, `IStoreAccessor.Raw2`, `IStoreAccessor.UnitSupport`

Alle bekannten Implementierungsklassen:
  `LongIDStoreAccessor`, `StoreAccessor`, `StoreAccessorBase`

public interface IStoreAccessor extends IQueryHandlerProvider, InternalCDOBranchManager.BranchLoader, InternalCDOCommitInfoManager.CommitInfoLoader
Represents a connection to a physical data storage back-end.

Autor:
  Eike Stepper

## Verschachtelte Klassen - Übersicht

Verschachtelte Klassen
Modifizierer und Typ
Schnittstelle
Beschreibung
`static interface`
`IStoreAccessor.CommitContext`
Represents the state of a single, logical commit operation which is driven through multiple calls to several methods on the `IStoreAccessor` API.
`static interface`
`IStoreAccessor.DurableLocking`
An extension interface for `store accessors` that support durable locking.
`static interface`
`IStoreAccessor.DurableLocking2`
An extension interface for `store accessors` that support durable locking.
`static interface`
`IStoreAccessor.NewIDSupport`
An extension interface for `store accessors` that support units.
`static interface`
`IStoreAccessor.QueryResourcesContext`
Represents the query execution state of a `resources query`.
`static interface`
`IStoreAccessor.QueryXRefsContext`
Represents the query execution state of a `XRefs query`.
`static interface`
`IStoreAccessor.Raw`
An extension interface for `store accessors` that support raw data access as needed by `repository synchronizers` or `server importers`.
`static interface`
`IStoreAccessor.Raw2`
An extension interface for `store accessors` that support raw data access as needed by `repository synchronizers` or `server importers`.
`static interface`
`IStoreAccessor.UnitSupport`
An extension interface for `store accessors` that support units.

## Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader

`InternalCDOBranchManager.BranchLoader.BranchInfo, InternalCDOBranchManager.BranchLoader.SubBranchInfo`

## Feldübersicht

### Von Schnittstelle geerbte Felder org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader

`NEW_BRANCH, NEW_LOCAL_BRANCH`

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`void`
`commit(org.eclipse.net4j.util.om.monitor.OMMonitor monitor)`
Flushes to the back-end and makes available the data for others.
`IStoreChunkReader`
`createChunkReader(InternalCDORevision revision, EStructuralFeature feature)`
`InternalSession`
`getSession()`
Returns the session this accessor is associated with.
`IStore`
`getStore()`
Returns the store this accessor is associated with.
`ITransaction`
`getTransaction()`
Returns the transaction this accessor is associated with if `isReader()` returns `false`, `null` otherwise.
`void`
`handleLobs(long fromTime, long toTime, CDOLobHandler handler)`
`void`
`handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime, CDORevisionHandler handler)`
Passes all revisions of the store to the `handler` if all of the following conditions are met: The `eClass` parameter is `null` or equal to `revision.getEClass()`.
`boolean`
`isReader()`
Returns `true` if this accessor has been configured for read-only access to the back-end, `false` otherwise.
`void`
`loadLob(byte[] id, OutputStream out)`
Serializes the content of the large object identified by the given `ID` to the given stream.
`EPackage[]`
`loadPackageUnit(InternalCDOPackageUnit packageUnit)`
Demand loads a given package proxy that has been created on startup of the repository.
`void`
`queryLobs(List<byte[]> ids)`
Determines which of the large objects identified by the given `IDs` are known in the backend represented by this `IStoreAccessor` by removing the unknown IDs from the passed collection.
`void`
`queryResources(IStoreAccessor.QueryResourcesContext context)`
`void`
`queryXRefs(IStoreAccessor.QueryXRefsContext context)`
`Set<CDOID>`
`readChangeSet(org.eclipse.net4j.util.om.monitor.OMMonitor monitor, CDOChangeSetSegment... segments)`
Returns a set of CDOIDs that have at least one revision in any of the passed branches and time ranges.
`Collection<InternalCDOPackageUnit>`
`readPackageUnits()`
`CDOID`
`readResourceID(CDOID folderID, String name, CDOBranchPoint branchPoint)`
Returns the `CDOID` of the resource node with the given folderID and name if a resource with this folderID and name exists in the store, `null` otherwise.
`InternalCDORevision`
`readRevision(CDOID id, CDOBranchPoint branchPoint, int listChunk, CDORevisionCacheAdder cache)`
Reads a revision from the back-end that was valid at the given timeStamp in the given branch.
`InternalCDORevision`
`readRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int listChunk, CDORevisionCacheAdder cache)`
Reads a revision with the given version in the given branch from the back-end.
`void`
`release()`
`void`
`rollback()`
Note: `write(InternalCommitContext, OMMonitor)` and `rollback()` could be called from different threads.
`void`
`write(InternalCommitContext context, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)`
Called before committing.
`void`
`writePackageUnits(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)`

### Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader

`createBranch, loadBranch, loadBranches, loadSubBranches`

### Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager.CommitInfoLoader

`loadCommitData, loadCommitInfos`

### Von Schnittstelle geerbte Methoden org.eclipse.emf.cdo.server.IQueryHandlerProvider

`getQueryHandler`

## Methodendetails

### getStore

IStore getStore()
Returns the store this accessor is associated with.

### getSession

InternalSession getSession()
Returns the session this accessor is associated with.

Seit:
  3.0

### getTransaction

ITransaction getTransaction()
Returns the transaction this accessor is associated with if `isReader()` returns `false`, `null` otherwise.

Seit:
  2.0

### isReader

boolean isReader()
Returns `true` if this accessor has been configured for read-only access to the back-end, `false` otherwise.

Seit:
  2.0

### createChunkReader

IStoreChunkReader createChunkReader(InternalCDORevision revision, EStructuralFeature feature)

Seit:
  2.0

### readPackageUnits

Collection<InternalCDOPackageUnit> readPackageUnits()

Seit:
  2.0

### loadPackageUnit

EPackage[] loadPackageUnit(InternalCDOPackageUnit packageUnit)
Demand loads a given package proxy that has been created on startup of the repository.

This method must only load the given package, not possible contained packages.

Seit:
  2.0

### readRevision

InternalCDORevision readRevision(CDOID id, CDOBranchPoint branchPoint, int listChunk, CDORevisionCacheAdder cache)
Reads a revision from the back-end that was valid at the given timeStamp in the given branch.

Seit:
  4.0

### readRevisionByVersion

InternalCDORevision readRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int listChunk, CDORevisionCacheAdder cache)
Reads a revision with the given version in the given branch from the back-end.

Seit:
  4.0

### handleRevisions

void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime, CDORevisionHandler handler)
Passes all revisions of the store to the `handler` if all of the following conditions are met:

- The `eClass` parameter is `null` or equal to `revision.getEClass()`.
- The `branch` parameter is `null` or equal to `revision.getBranch()`.
- One of the following conditions is met:
  - The `timeStamp` parameter is `INVALID`.
  - The `exactTime` parameter is `true` and the `timeStamp` parameter is `UNSPECIFIED` or equal to `revision.getTimeStamp()`.
  - The `exactTime` parameter is `false` and the `timeStamp` parameter is between `revision.getTimeStamp()` and `revision.getRevised()`.

Seit:
  4.0

### readChangeSet

Set<CDOID> readChangeSet(org.eclipse.net4j.util.om.monitor.OMMonitor monitor, CDOChangeSetSegment... segments)
Returns a set of CDOIDs that have at least one revision in any of the passed branches and time ranges. DetachedCDORevisions must also be considered!

Seit:
  4.0

### readResourceID

CDOID readResourceID(CDOID folderID, String name, CDOBranchPoint branchPoint)
Returns the `CDOID` of the resource node with the given folderID and name if a resource with this folderID and name exists in the store, `null` otherwise.

Seit:
  3.0

### queryResources

void queryResources(IStoreAccessor.QueryResourcesContext context)

Seit:
  2.0

### queryXRefs

void queryXRefs(IStoreAccessor.QueryXRefsContext context)

Seit:
  3.0

### queryLobs

void queryLobs(List<byte[]> ids)
Determines which of the large objects identified by the given `IDs` are known in the backend represented by this `IStoreAccessor` by removing the unknown IDs from the passed collection.

The identifier of a `large object` is the SHA-1 digest of the content of this large object.

Usage context: This method is only called in the context of a commit operation of a client transaction if that transaction contains additions of or changes to large objects.

Parameter:
  `ids` - the collection of large object IDs that the unknown IDs are supposed to be removed from.
Seit:
  4.0

### loadLob

void loadLob(byte[] id, OutputStream out) throws IOException
Serializes the content of the large object identified by the given `ID` to the given stream.

The identifier of a `large object` is the SHA-1 digest of the content of this large object.

Parameter:
  `id` - the ID of the large object whose content is to be written to the stream.
Löst aus:
  `IOException` - if the stream could not be written to.
Seit:
  4.0

### handleLobs

void handleLobs(long fromTime, long toTime, CDOLobHandler handler) throws IOException

Löst aus:
  `IOException`
Seit:
  4.0

### writePackageUnits

void writePackageUnits(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)

Seit:
  2.0

### write

void write(InternalCommitContext context, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
Called before committing. An instance of this accessor represents an instance of a back-end transaction. Could be called multiple times before commit it called. `commit(OMMonitor)` or `rollback()` will be called after any numbers of `write(InternalCommitContext, OMMonitor)`.

Note: `write(InternalCommitContext, OMMonitor)` and `commit(OMMonitor)` could be called from different threads.

Seit:
  3.0

### commit

void commit(org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
Flushes to the back-end and makes available the data for others.

Note: `write(InternalCommitContext, OMMonitor)` and `commit(OMMonitor)` could be called from different threads.

Note: Implementors should detect if dirty write occurred. In this case it should throw an exception.

     if (revision.getVersion() != revisionDelta.getOriginVersion())
     {
       throw new ConcurrentModificationException("Trying to update object " + revisionDelta.getID()
           + " that was already modified");
     }

Seit:
  2.0

### rollback

void rollback()
Note: `write(InternalCommitContext, OMMonitor)` and `rollback()` could be called from different threads.

Seit:
  2.0

### release

void release()