Interface IStoreAccessor.Raw
- All Superinterfaces:
InternalCDOBranchManager.BranchLoader
,InternalCDOCommitInfoManager.CommitInfoLoader
,IQueryHandlerProvider
,IStoreAccessor
- All Known Subinterfaces:
IDBStoreAccessor
,IStoreAccessor.Raw2
- Enclosing interface:
- IStoreAccessor
store accessors
that support raw data access as needed by
repository synchronizers
or server importers
.- Since:
- 4.0
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader
InternalCDOBranchManager.BranchLoader.BranchInfo, InternalCDOBranchManager.BranchLoader.SubBranchInfo
Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.server.IStoreAccessor
IStoreAccessor.CommitContext, IStoreAccessor.DurableLocking, IStoreAccessor.DurableLocking2, IStoreAccessor.QueryResourcesContext, IStoreAccessor.QueryXRefsContext, IStoreAccessor.Raw, IStoreAccessor.Raw2, IStoreAccessor.UnitSupport
-
Field Summary
Fields inherited from interface org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoader
NEW_BRANCH, NEW_LOCAL_BRANCH
-
Method Summary
Modifier and TypeMethodDescriptionvoid
rawCommit
(double commitWork, org.eclipse.net4j.util.om.monitor.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, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Deletes the revision identified by the givenkey
from the backend represented by thisraw store accessor
without going through a regularcommit
.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 therawImport()
method of a different instance of the same implementation ofraw store accessor
.void
rawImport
(CDODataInput in, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Deserializes backend data that has been serialized by therawExport()
method of a different instance of the same implementation ofraw store accessor
.void
rawStore
(byte[] id, long size, InputStream inputStream) Stores the givenblob
in the backend represented by thisraw store accessor
without going through a regularcommit
.void
Stores the givenclob
in the backend represented by thisraw store accessor
without going through a regularcommit
.void
rawStore
(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Stores the givencommit
in the backend represented by thisraw store accessor
without going through a regularcommit
.void
rawStore
(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Stores the givenpackage units
in the backend represented by thisraw store accessor
without going through a regular#commit(OMMonitor) commit
.void
rawStore
(InternalCDORevision revision, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Stores the givenrevision
in the backend represented by thisraw store accessor
without going through a regularcommit
.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
Methods inherited from interface org.eclipse.emf.cdo.server.IQueryHandlerProvider
getQueryHandler
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
-
Method Details
-
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 therawImport()
method of a different instance of the same implementation ofraw 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 fromIRepositorySynchronizer
.- Parameters:
out
- the stream to serialize the data to.fromBranchID
- theID
of the first branch to be exported.toBranchID
- theID
of the last branch to be exported.fromCommitTime
- the firsttime stamp
of all non-branch data (e.g.revisions
,commit infos
,package units
, etc...) to be exported.toCommitTime
- the lasttime 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 thisraw store accessor
does not support branching.
-
rawImport
void rawImport(CDODataInput in, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) throws IOException Deserializes backend data that has been serialized by therawExport()
method of a different instance of the same implementation ofraw 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 fromIRepositorySynchronizer
.- Parameters:
in
- the stream to deserialize the data from.fromBranchID
- theID
of the first branch to be imported.toBranchID
- theID
of the last branch to be imported.fromCommitTime
- the firsttime stamp
of all non-branch data (e.g.revisions
,commit infos
,package units
, etc...) to be imported.toCommitTime
- the lasttime 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 thisraw store accessor
does not support branching.
-
rawStore
void rawStore(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Stores the givenpackage units
in the backend represented by thisraw store accessor
without going through a regular#commit(OMMonitor) commit
. A regular commit operation would assign newtime 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 thisraw 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:
-
rawStore
Stores the givenrevision
in the backend represented by thisraw store accessor
without going through a regularcommit
. A regular commit operation would assign newIDs
andtime 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 thisraw 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:
-
rawStore
Stores the givenblob
in the backend represented by thisraw store accessor
without going through a regularcommit
.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
- theID
of the blob to be stored in the backend represented by thisraw store accessor
.size
- thesize
of the blob to be stored in the backend represented by thisraw store accessor
.inputStream
- thecontents
of the blob to be stored in the backend represented by thisraw store accessor
.- Throws:
IOException
- See Also:
-
rawStore
Stores the givenclob
in the backend represented by thisraw store accessor
without going through a regularcommit
.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
- theID
of the clob to be stored in the backend represented by thisraw store accessor
.size
- thesize
of the clob to be stored in the backend represented by thisraw store accessor
.reader
- thecontents
of the clob to be stored in the backend represented by thisraw store accessor
.- Throws:
IOException
- See Also:
-
rawStore
void rawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Stores the givencommit
in the backend represented by thisraw store accessor
without going through a regularcommit
.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
- thebranch
of the commit info to be stored in the backend represented by thisraw store accessor
.timeStamp
- thetime stamp
of the commit info to be stored in the backend represented by thisraw store accessor
.previousTimeStamp
- theprevious time stamp
of the commit info to be stored in the backend represented by thisraw store accessor
.userID
- theuser ID
of the commit info to be stored in the backend represented by thisraw store accessor
.comment
- thecomment
of the commit info to be stored in the backend represented by thisraw store accessor
.- See Also:
-
rawDelete
void rawDelete(CDOID id, int version, CDOBranch branch, EClass eClass, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Deletes the revision identified by the givenkey
from the backend represented by thisraw store accessor
without going through a regularcommit
.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
void rawCommit(double commitWork, org.eclipse.net4j.util.om.monitor.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:
-