org.eclipse.emf.cdo.server
Interface IStoreAccessor.Raw

All Superinterfaces:
InternalCDOBranchManager.BranchLoader, InternalCDOCommitInfoManager.CommitInfoLoader, IQueryHandlerProvider, IStoreAccessor
All Known Subinterfaces:
IDBStoreAccessor, IHibernateStoreAccessor, IObjectivityStoreAccessor
Enclosing interface:
IStoreAccessor

public static interface IStoreAccessor.Raw
extends IStoreAccessor

An extension interface for store accessors that support raw data access as needed by repository synchronizers or server importers.

Since:
4.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.server.IStoreAccessor
IStoreAccessor.CommitContext, IStoreAccessor.DurableLocking, IStoreAccessor.DurableLocking2, IStoreAccessor.QueryResourcesContext, IStoreAccessor.QueryXRefsContext, IStoreAccessor.Raw
 
Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader
InternalCDOBranchManager.BranchLoader.BranchInfo, InternalCDOBranchManager.BranchLoader.SubBranchInfo
 
Field Summary
 
Fields inherited from interface org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader
NEW_BRANCH, NEW_LOCAL_BRANCH
 
Method Summary
 void rawCommit(double commitWork, OMMonitor monitor)
          Atomically commits the accumulated backend changes resulting from previous calls to the rawStore() methods.
 void rawDelete(CDOID id, int version, CDOBranch branch, EClass eClass, OMMonitor monitor)
          Deprecated. Not used anymore
 void rawExport(CDODataOutput out, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime)
          Serializes all backend data within the given ranges such that it can be deserialized by the rawImport() method of a different instance of the same implementation of raw store accessor.
 void rawImport(CDODataInput in, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime, OMMonitor monitor)
          Deserializes backend data that has been serialized by the rawExport() method of a different instance of the same implementation of raw store accessor.
 void rawStore(byte[] id, long size, InputStream inputStream)
          Stores the given blob in the backend represented by this raw store accessor without going through a regular commit.
 void rawStore(byte[] id, long size, Reader reader)
          Stores the given clob in the backend represented by this raw store accessor without going through a regular commit.
 void rawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment, OMMonitor monitor)
          Stores the given commit in the backend represented by this raw store accessor without going through a regular commit.
 void rawStore(InternalCDOPackageUnit[] packageUnits, OMMonitor monitor)
          Stores the given package units in the backend represented by this raw store accessor without going through a regular #commit(OMMonitor) commit.
 void rawStore(InternalCDORevision revision, OMMonitor monitor)
          Stores the given revision in the backend represented by this raw store accessor without going through a regular commit.
 
Methods inherited from interface org.eclipse.emf.cdo.server.IStoreAccessor
commit, createChunkReader, getSession, getStore, getTransaction, handleLobs, handleRevisions, isReader, loadLob, loadPackageUnit, queryLobs, queryResources, queryXRefs, readChangeSet, readPackageUnits, readResourceID, readRevision, readRevisionByVersion, release, rollback, write, writePackageUnits
 
Methods inherited from interface org.eclipse.emf.cdo.server.IQueryHandlerProvider
getQueryHandler
 
Methods inherited from interface org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader
createBranch, loadBranch, loadBranches, loadSubBranches
 
Methods inherited from interface org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager.CommitInfoLoader
loadCommitData, loadCommitInfos
 

Method Detail

rawExport

void rawExport(CDODataOutput out,
               int fromBranchID,
               int toBranchID,
               long fromCommitTime,
               long toCommitTime)
               throws IOException
Serializes all backend data within the given ranges such that it can be deserialized by the rawImport() method of a different instance of the same implementation of raw store accessor.

Implementation note: The implementor of this method is free to choose a serialization format as it only needs to be understood by different instances of the same implementation of raw store accessor.

Usage context: This method is only called in the context of a REPLICATE_REPOSITORY_RAW signal that is triggered from IRepositorySynchronizer.

Parameters:
out - the stream to serialize the data to.
fromBranchID - the ID of the first branch to be exported.
toBranchID - the ID of the last branch to be exported.
fromCommitTime - the first time stamp of all non-branch data (e.g. revisions, commit infos, package units, etc...) to be exported.
toCommitTime - the last time stamp of all non-branch data (e.g. revisions, commit infos, package units, etc...) to be exported.
Throws:
IOException - if the stream could not be written to.
UnsupportedOperationException - if this raw store accessor does not support branching.

rawImport

void rawImport(CDODataInput in,
               int fromBranchID,
               int toBranchID,
               long fromCommitTime,
               long toCommitTime,
               OMMonitor monitor)
               throws IOException
Deserializes backend data that has been serialized by the rawExport() method of a different instance of the same implementation of raw store accessor.

Implementation note: The implementor of this method is free to choose a serialization format as it only needs to be understood by different instances of the same implementation of raw store accessor.

Usage context: This method is only called in the context of a REPLICATE_REPOSITORY_RAW signal that is triggered from IRepositorySynchronizer.

Parameters:
in - the stream to deserialize the data from.
fromBranchID - the ID of the first branch to be imported.
toBranchID - the ID of the last branch to be imported.
fromCommitTime - the first time stamp of all non-branch data (e.g. revisions, commit infos, package units, etc...) to be imported.
toCommitTime - the last time stamp of all non-branch data (e.g. revisions, commit infos, package units, etc...) to be imported.
Throws:
IOException - if the stream could not be read from.
UnsupportedOperationException - if this raw store accessor does not support branching.

rawStore

void rawStore(InternalCDOPackageUnit[] packageUnits,
              OMMonitor monitor)
Stores the given package units in the backend represented by this raw store accessor without going through a regular #commit(OMMonitor) commit. A regular commit operation would assign new time stamps, which is not desired in the context of a replication operation.

Implementation note: The implementor of this method may rely on the fact that multiple subsequent calls to this method are followed by a single final call to the rawCommit() method where the accumulated backend changes can be committed atomically.

Parameters:
packageUnits - the package units to be stored in the backend represented by this raw store accessor.
monitor - a progress monitor that may be used to report proper progress of this operation to the caller and may be used to react to cancelation requests of the caller and must be touched regularly to prevent timeouts from expiring in the caller.
See Also:
rawCommit(double, OMMonitor)

rawStore

void rawStore(InternalCDORevision revision,
              OMMonitor monitor)
Stores the given revision in the backend represented by this raw store accessor without going through a regular commit. A regular commit operation would assign new IDs and time stamps, which is not desired in the context of a replication operation.

Implementation note: The implementor of this method may rely on the fact that multiple subsequent calls to this method are followed by a single final call to the rawCommit() method where the accumulated backend changes can be committed atomically.

Parameters:
revision - the revision to be stored in the backend represented by this raw store accessor.
monitor - a progress monitor that may be used to report proper progress of this operation to the caller and may be used to react to cancelation requests of the caller and must be touched regularly to prevent timeouts from expiring in the caller.
See Also:
rawCommit(double, OMMonitor)

rawStore

void rawStore(byte[] id,
              long size,
              InputStream inputStream)
              throws IOException
Stores the given blob in the backend represented by this raw store accessor without going through a regular commit.

Implementation note: The implementor of this method may rely on the fact that multiple subsequent calls to this method are followed by a single final call to the rawCommit() method where the accumulated backend changes can be committed atomically.

Parameters:
id - the ID of the blob to be stored in the backend represented by this raw store accessor.
size - the size of the blob to be stored in the backend represented by this raw store accessor.
inputStream - the contents of the blob to be stored in the backend represented by this raw store accessor.
Throws:
IOException
See Also:
rawCommit(double, OMMonitor)

rawStore

void rawStore(byte[] id,
              long size,
              Reader reader)
              throws IOException
Stores the given clob in the backend represented by this raw store accessor without going through a regular commit.

Implementation note: The implementor of this method may rely on the fact that multiple subsequent calls to this method are followed by a single final call to the rawCommit() method where the accumulated backend changes can be committed atomically.

Parameters:
id - the ID of the clob to be stored in the backend represented by this raw store accessor.
size - the size of the clob to be stored in the backend represented by this raw store accessor.
reader - the contents of the clob to be stored in the backend represented by this raw store accessor.
Throws:
IOException
See Also:
rawCommit(double, OMMonitor)

rawStore

void rawStore(CDOBranch branch,
              long timeStamp,
              long previousTimeStamp,
              String userID,
              String comment,
              OMMonitor monitor)
Stores the given commit in the backend represented by this raw store accessor without going through a regular commit.

Implementation note: The implementor of this method may rely on the fact that multiple subsequent calls to this method are followed by a single final call to the rawCommit() method where the accumulated backend changes can be committed atomically.

Parameters:
branch - the branch of the commit info to be stored in the backend represented by this raw store accessor.
timeStamp - the time stamp of the commit info to be stored in the backend represented by this raw store accessor.
previousTimeStamp - the previous time stamp of the commit info to be stored in the backend represented by this raw store accessor.
userID - the user ID of the commit info to be stored in the backend represented by this raw store accessor.
comment - the comment of the commit info to be stored in the backend represented by this raw store accessor.
See Also:
rawCommit(double, OMMonitor)

rawDelete

@Deprecated
void rawDelete(CDOID id,
                          int version,
                          CDOBranch branch,
                          EClass eClass,
                          OMMonitor monitor)
Deprecated. Not used anymore

Deletes the revision identified by the given key from the backend represented by this raw store accessor without going through a regular commit.

Implementation note: The implementor of this method may rely on the fact that multiple subsequent calls to this method are followed by a single final call to the rawCommit() method where the accumulated backend changes can be committed atomically.

See Also:
rawCommit(double, OMMonitor)

rawCommit

void rawCommit(double commitWork,
               OMMonitor monitor)
Atomically commits the accumulated backend changes resulting from previous calls to the rawStore() methods.

Parameters:
commitWork - the amount of work to use up from the monitor while executing the commit.
monitor - a progress monitor that may be used to report proper progress of this operation to the caller and may be used to react to cancelation requests of the caller and must be touched regularly to prevent timeouts from expiring in the caller.
See Also:
rawStore(InternalCDOPackageUnit[], OMMonitor), rawStore(InternalCDORevision, OMMonitor), rawStore(byte[], long, InputStream), rawStore(byte[], long, Reader), rawStore(CDOBranch, long, long, String, String, OMMonitor)


Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.