Interface IStoreAccessor.Raw
-
- All Superinterfaces:
InternalCDOBranchManager.BranchLoader,InternalCDOCommitInfoManager.CommitInfoLoader,IQueryHandlerProvider,IStoreAccessor
- All Known Subinterfaces:
IDBStoreAccessor,IStoreAccessor.Raw2
- Enclosing interface:
- IStoreAccessor
public static interface IStoreAccessor.Raw extends IStoreAccessor
An extension interface forstore accessorsthat support raw data access as needed byrepository synchronizersorserver 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrawCommit(double commitWork, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Atomically commits the accumulated backend changes resulting from previous calls to the rawStore() methods.voidrawDelete(CDOID id, int version, CDOBranch branch, org.eclipse.emf.ecore.EClass eClass, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Deletes the revision identified by the givenkeyfrom the backend represented by thisraw store accessorwithout going through a regularcommit.voidrawExport(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.voidrawImport(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.voidrawStore(byte[] id, long size, java.io.InputStream inputStream)Stores the givenblobin the backend represented by thisraw store accessorwithout going through a regularcommit.voidrawStore(byte[] id, long size, java.io.Reader reader)Stores the givenclobin the backend represented by thisraw store accessorwithout going through a regularcommit.voidrawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, java.lang.String userID, java.lang.String comment, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Stores the givencommitin the backend represented by thisraw store accessorwithout going through a regularcommit.voidrawStore(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Stores the givenpackage unitsin the backend represented by thisraw store accessorwithout going through a regular#commit(OMMonitor) commit.voidrawStore(InternalCDORevision revision, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Stores the givenrevisionin the backend represented by thisraw store accessorwithout 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 Detail
-
rawExport
void rawExport(CDODataOutput out, int fromBranchID, int toBranchID, long fromCommitTime, long toCommitTime) throws java.io.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_RAWsignal that is triggered fromIRepositorySynchronizer.- Parameters:
out- the stream to serialize the data to.fromBranchID- theIDof the first branch to be exported.toBranchID- theIDof the last branch to be exported.fromCommitTime- the firsttime stampof all non-branch data (e.g.revisions,commit infos,package units, etc...) to be exported.toCommitTime- the lasttime stampof all non-branch data (e.g.revisions,commit infos,package units, etc...) to be exported.- Throws:
java.io.IOException- if the stream could not be written to.java.lang.UnsupportedOperationException- if thisraw store accessordoes 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 java.io.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_RAWsignal that is triggered fromIRepositorySynchronizer.- Parameters:
in- the stream to deserialize the data from.fromBranchID- theIDof the first branch to be imported.toBranchID- theIDof the last branch to be imported.fromCommitTime- the firsttime stampof all non-branch data (e.g.revisions,commit infos,package units, etc...) to be imported.toCommitTime- the lasttime stampof all non-branch data (e.g.revisions,commit infos,package units, etc...) to be imported.- Throws:
java.io.IOException- if the stream could not be read from.java.lang.UnsupportedOperationException- if thisraw store accessordoes not support branching.
-
rawStore
void rawStore(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
Stores the givenpackage unitsin the backend represented by thisraw store accessorwithout 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:
rawCommit(double, OMMonitor)
-
rawStore
void rawStore(InternalCDORevision revision, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
Stores the givenrevisionin the backend represented by thisraw store accessorwithout going through a regularcommit. A regular commit operation would assign newIDsandtime 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:
rawCommit(double, OMMonitor)
-
rawStore
void rawStore(byte[] id, long size, java.io.InputStream inputStream) throws java.io.IOExceptionStores the givenblobin the backend represented by thisraw store accessorwithout 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- theIDof the blob to be stored in the backend represented by thisraw store accessor.size- thesizeof the blob to be stored in the backend represented by thisraw store accessor.inputStream- thecontentsof the blob to be stored in the backend represented by thisraw store accessor.- Throws:
java.io.IOException- See Also:
rawCommit(double, OMMonitor)
-
rawStore
void rawStore(byte[] id, long size, java.io.Reader reader) throws java.io.IOExceptionStores the givenclobin the backend represented by thisraw store accessorwithout 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- theIDof the clob to be stored in the backend represented by thisraw store accessor.size- thesizeof the clob to be stored in the backend represented by thisraw store accessor.reader- thecontentsof the clob to be stored in the backend represented by thisraw store accessor.- Throws:
java.io.IOException- See Also:
rawCommit(double, OMMonitor)
-
rawStore
void rawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, java.lang.String userID, java.lang.String comment, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
Stores the givencommitin the backend represented by thisraw store accessorwithout 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- thebranchof the commit info to be stored in the backend represented by thisraw store accessor.timeStamp- thetime stampof the commit info to be stored in the backend represented by thisraw store accessor.previousTimeStamp- theprevious time stampof the commit info to be stored in the backend represented by thisraw store accessor.userID- theuser IDof the commit info to be stored in the backend represented by thisraw store accessor.comment- thecommentof the commit info to be stored in the backend represented by thisraw store accessor.- See Also:
rawCommit(double, OMMonitor)
-
rawDelete
void rawDelete(CDOID id, int version, CDOBranch branch, org.eclipse.emf.ecore.EClass eClass, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
Deletes the revision identified by the givenkeyfrom the backend represented by thisraw store accessorwithout 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(double, OMMonitor)
-
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:
rawStore(InternalCDOPackageUnit[], OMMonitor),rawStore(InternalCDORevision, OMMonitor),rawStore(byte[], long, InputStream),rawStore(byte[], long, Reader),rawStore(CDOBranch, long, long, String, String, OMMonitor)
-
-