Interface IStoreAccessor
- 
- All Superinterfaces:
- InternalCDOBranchManager.BranchLoader,- InternalCDOCommitInfoManager.CommitInfoLoader,- IQueryHandlerProvider
 - All Known Subinterfaces:
- IDBStoreAccessor,- ILissomeStoreAccessor,- IMongoDBStoreAccessor,- IStoreAccessor.Raw,- IStoreAccessor.Raw2,- IStoreAccessor.UnitSupport
 - All Known Implementing Classes:
- LongIDStoreAccessor,- StoreAccessor,- StoreAccessorBase
 
 public interface IStoreAccessor extends IQueryHandlerProvider, InternalCDOBranchManager.BranchLoader, InternalCDOCommitInfoManager.CommitInfoLoader Represents a connection to a physical data storage back-end.- Author:
- Eike Stepper
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceIStoreAccessor.CommitContextRepresents the state of a single, logical commit operation which is driven through multiple calls to several methods on theIStoreAccessorAPI.static interfaceIStoreAccessor.DurableLockingAn extension interface forstore accessorsthat support durable locking.static interfaceIStoreAccessor.DurableLocking2An extension interface forstore accessorsthat support durable locking.static interfaceIStoreAccessor.QueryResourcesContextRepresents the query execution state of aresources query.static interfaceIStoreAccessor.QueryXRefsContextRepresents the query execution state of aXRefs query.static interfaceIStoreAccessor.RawAn extension interface forstore accessorsthat support raw data access as needed byrepository synchronizersorserver importers.static interfaceIStoreAccessor.Raw2An extension interface forstore accessorsthat support raw data access as needed byrepository synchronizersorserver importers.static interfaceIStoreAccessor.UnitSupportAn extension interface forstore accessorsthat support units.- 
Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoaderInternalCDOBranchManager.BranchLoader.BranchInfo, InternalCDOBranchManager.BranchLoader.SubBranchInfo
 
- 
 - 
Field Summary- 
Fields inherited from interface org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoaderNEW_BRANCH, NEW_LOCAL_BRANCH
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcommit(org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Flushes to the back-end and makes available the data for others.IStoreChunkReadercreateChunkReader(InternalCDORevision revision, org.eclipse.emf.ecore.EStructuralFeature feature)InternalSessiongetSession()Returns the session this accessor is associated with.IStoregetStore()Returns the store this accessor is associated with.ITransactiongetTransaction()Returns the transaction this accessor is associated with ifisReader()returnsfalse,nullotherwise.voidhandleLobs(long fromTime, long toTime, CDOLobHandler handler)voidhandleRevisions(org.eclipse.emf.ecore.EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime, CDORevisionHandler handler)Passes all revisions of the store to thehandlerif all of the following conditions are met: TheeClassparameter isnullor equal torevision.getEClass().booleanisReader()Returnstrueif this accessor has been configured for read-only access to the back-end,falseotherwise.voidloadLob(byte[] id, java.io.OutputStream out)Serializes the content of the large object identified by the givenIDto the given stream.org.eclipse.emf.ecore.EPackage[]loadPackageUnit(InternalCDOPackageUnit packageUnit)Demand loads a given package proxy that has been created on startup of the repository.voidqueryLobs(java.util.List<byte[]> ids)Determines which of the large objects identified by the givenIDsare known in the backend represented by thisIStoreAccessorby removing the unknown IDs from the passed collection.voidqueryResources(IStoreAccessor.QueryResourcesContext context)voidqueryXRefs(IStoreAccessor.QueryXRefsContext context)java.util.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.java.util.Collection<InternalCDOPackageUnit>readPackageUnits()CDOIDreadResourceID(CDOID folderID, java.lang.String name, CDOBranchPoint branchPoint)Returns theCDOIDof the resource node with the given folderID and name if a resource with this folderID and name exists in the store,nullotherwise.InternalCDORevisionreadRevision(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.InternalCDORevisionreadRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int listChunk, CDORevisionCacheAdder cache)Reads a revision with the given version in the given branch from the back-end.voidrelease()voidrollback()Note:write(InternalCommitContext, OMMonitor)androllback()could be called from different threads.voidwrite(InternalCommitContext context, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Called before committing.voidwritePackageUnits(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)- 
Methods inherited from interface org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoadercreateBranch, loadBranch, loadBranches, loadSubBranches
 - 
Methods inherited from interface org.eclipse.emf.cdo.spi.common.commit.InternalCDOCommitInfoManager.CommitInfoLoaderloadCommitData, loadCommitInfos
 - 
Methods inherited from interface org.eclipse.emf.cdo.server.IQueryHandlerProvidergetQueryHandler
 
- 
 
- 
- 
- 
Method Detail- 
getStoreIStore getStore() Returns the store this accessor is associated with.
 - 
getSessionInternalSession getSession() Returns the session this accessor is associated with.- Since:
- 3.0
 
 - 
getTransactionITransaction getTransaction() Returns the transaction this accessor is associated with ifisReader()returnsfalse,nullotherwise.- Since:
- 2.0
 
 - 
isReaderboolean isReader() Returnstrueif this accessor has been configured for read-only access to the back-end,falseotherwise.- Since:
- 2.0
 
 - 
createChunkReaderIStoreChunkReader createChunkReader(InternalCDORevision revision, org.eclipse.emf.ecore.EStructuralFeature feature) - Since:
- 2.0
 
 - 
readPackageUnitsjava.util.Collection<InternalCDOPackageUnit> readPackageUnits() - Since:
- 2.0
 
 - 
loadPackageUnitorg.eclipse.emf.ecore.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. - Since:
- 2.0
 
 - 
readRevisionInternalCDORevision 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.- Since:
- 4.0
 
 - 
readRevisionByVersionInternalCDORevision readRevisionByVersion(CDOID id, CDOBranchVersion branchVersion, int listChunk, CDORevisionCacheAdder cache) Reads a revision with the given version in the given branch from the back-end.- Since:
- 4.0
 
 - 
handleRevisionsvoid handleRevisions(org.eclipse.emf.ecore.EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime, CDORevisionHandler handler)Passes all revisions of the store to thehandlerif all of the following conditions are met:- The eClassparameter isnullor equal torevision.getEClass().
- The branchparameter isnullor equal torevision.getBranch().
- One of the following conditions is met:
 - The timeStampparameter isINVALID.
- The exactTimeparameter istrueand thetimeStampparameter isUNSPECIFIEDor equal torevision.getTimeStamp().
- The exactTimeparameter isfalseand thetimeStampparameter is betweenrevision.getTimeStamp()andrevision.getRevised().
 
- The 
 - Since:
- 4.0
 
- The 
 - 
readChangeSetjava.util.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!- Since:
- 4.0
 
 - 
readResourceIDCDOID readResourceID(CDOID folderID, java.lang.String name, CDOBranchPoint branchPoint) Returns theCDOIDof the resource node with the given folderID and name if a resource with this folderID and name exists in the store,nullotherwise.- Since:
- 3.0
 
 - 
queryResourcesvoid queryResources(IStoreAccessor.QueryResourcesContext context) - Since:
- 2.0
 
 - 
queryXRefsvoid queryXRefs(IStoreAccessor.QueryXRefsContext context) - Since:
- 3.0
 
 - 
queryLobsvoid queryLobs(java.util.List<byte[]> ids) Determines which of the large objects identified by the givenIDsare known in the backend represented by thisIStoreAccessorby removing the unknown IDs from the passed collection.The identifier of a large objectis 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. - Parameters:
- ids- the collection of large object IDs that the unknown IDs are supposed to be removed from.
- Since:
- 4.0
 
 - 
loadLobvoid loadLob(byte[] id, java.io.OutputStream out) throws java.io.IOExceptionSerializes the content of the large object identified by the givenIDto the given stream.The identifier of a large objectis the SHA-1 digest of the content of this large object.- Parameters:
- id- the ID of the large object whose content is to be written to the stream.
- Throws:
- java.io.IOException- if the stream could not be written to.
- Since:
- 4.0
 
 - 
handleLobsvoid handleLobs(long fromTime, long toTime, CDOLobHandler handler) throws java.io.IOException- Throws:
- java.io.IOException
- Since:
- 4.0
 
 - 
writePackageUnitsvoid writePackageUnits(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) - Since:
- 2.0
 
 - 
writevoid 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)orrollback()will be called after any numbers ofwrite(InternalCommitContext, OMMonitor).Note: write(InternalCommitContext, OMMonitor)andcommit(OMMonitor)could be called from different threads.- Since:
- 3.0
 
 - 
commitvoid 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)andcommit(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"); }- Since:
- 2.0
 
 - 
rollbackvoid rollback() Note:write(InternalCommitContext, OMMonitor)androllback()could be called from different threads.- Since:
- 2.0
 
 - 
releasevoid release() 
 
- 
 
-