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 for store accessors that support raw data access as needed by repository synchronizers or server importers.
Since:
4.0
Author:
Eike Stepper
  • 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 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, org.eclipse.net4j.util.om.monitor.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, org.eclipse.net4j.util.om.monitor.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:
    • rawStore

      void rawStore(InternalCDORevision revision, org.eclipse.net4j.util.om.monitor.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:
    • 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:
    • 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:
    • rawStore

      void rawStore(CDOBranch branch, long timeStamp, long previousTimeStamp, String userID, String comment, org.eclipse.net4j.util.om.monitor.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:
    • 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 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

      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: