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
- Author:
- Eike Stepper
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Represents the state of a single, logical commit operation which is driven through multiple calls to several methods on theIStoreAccessor
API.static interface
An extension interface forstore accessors
that support durable locking.static interface
An extension interface forstore accessors
that support durable locking.static interface
Represents the query execution state of aresources query
.static interface
Represents the query execution state of aXRefs query
.static interface
An extension interface forstore accessors
that support raw data access as needed byrepository synchronizers
orserver importers
.static interface
An extension interface forstore accessors
that support raw data access as needed byrepository synchronizers
orserver importers
.static interface
An extension interface forstore accessors
that support units.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
Modifier and TypeMethodDescriptionvoid
commit
(org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Flushes to the back-end and makes available the data for others.createChunkReader
(InternalCDORevision revision, EStructuralFeature feature) Returns the session this accessor is associated with.getStore()
Returns the store this accessor is associated with.Returns the transaction this accessor is associated with ifisReader()
returnsfalse
,null
otherwise.void
handleLobs
(long fromTime, long toTime, CDOLobHandler handler) void
handleRevisions
(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime, CDORevisionHandler handler) Passes all revisions of the store to thehandler
if all of the following conditions are met: TheeClass
parameter isnull
or equal torevision.getEClass()
.boolean
isReader()
Returnstrue
if this accessor has been configured for read-only access to the back-end,false
otherwise.void
loadLob
(byte[] id, OutputStream out) Serializes the content of the large object identified by the givenID
to the given stream.EPackage[]
loadPackageUnit
(InternalCDOPackageUnit packageUnit) Demand loads a given package proxy that has been created on startup of the repository.void
Determines which of the large objects identified by the givenIDs
are known in the backend represented by thisIStoreAccessor
by removing the unknown IDs from the passed collection.void
void
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.readResourceID
(CDOID folderID, String name, CDOBranchPoint branchPoint) Returns theCDOID
of the resource node with the given folderID and name if a resource with this folderID and name exists in the store,null
otherwise.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.readRevisionByVersion
(CDOID id, CDOBranchVersion branchVersion, int listChunk, CDORevisionCacheAdder cache) Reads a revision with the given version in the given branch from the back-end.void
release()
void
rollback()
Note:write(InternalCommitContext, OMMonitor)
androllback()
could be called from different threads.void
write
(InternalCommitContext context, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Called before committing.void
writePackageUnits
(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) 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
-
Method Details
-
getStore
IStore getStore()Returns the store this accessor is associated with. -
getSession
InternalSession getSession()Returns the session this accessor is associated with.- Since:
- 3.0
-
getTransaction
ITransaction getTransaction()Returns the transaction this accessor is associated with ifisReader()
returnsfalse
,null
otherwise.- Since:
- 2.0
-
isReader
boolean isReader()Returnstrue
if this accessor has been configured for read-only access to the back-end,false
otherwise.- Since:
- 2.0
-
createChunkReader
- Since:
- 2.0
-
readPackageUnits
Collection<InternalCDOPackageUnit> readPackageUnits()- Since:
- 2.0
-
loadPackageUnit
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
-
readRevision
InternalCDORevision 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
-
readRevisionByVersion
InternalCDORevision 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
-
handleRevisions
void handleRevisions(EClass eClass, CDOBranch branch, long timeStamp, boolean exactTime, CDORevisionHandler handler) Passes all revisions of the store to thehandler
if all of the following conditions are met:- The
eClass
parameter isnull
or equal torevision.getEClass()
. - The
branch
parameter isnull
or equal torevision.getBranch()
. - One of the following conditions is met:
- The
timeStamp
parameter isINVALID
. - The
exactTime
parameter istrue
and thetimeStamp
parameter isUNSPECIFIED
or equal torevision.getTimeStamp()
. - The
exactTime
parameter isfalse
and thetimeStamp
parameter is betweenrevision.getTimeStamp()
andrevision.getRevised()
.
- The
- Since:
- 4.0
- The
-
readChangeSet
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
-
readResourceID
Returns theCDOID
of the resource node with the given folderID and name if a resource with this folderID and name exists in the store,null
otherwise.- Since:
- 3.0
-
queryResources
- Since:
- 2.0
-
queryXRefs
- Since:
- 3.0
-
queryLobs
Determines which of the large objects identified by the givenIDs
are known in the backend represented by thisIStoreAccessor
by removing the unknown IDs from the passed collection.The identifier of a
large object
is 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
-
loadLob
Serializes the content of the large object identified by the givenID
to the given stream.The identifier of a
large object
is 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:
IOException
- if the stream could not be written to.- Since:
- 4.0
-
handleLobs
- Throws:
IOException
- Since:
- 4.0
-
writePackageUnits
void writePackageUnits(InternalCDOPackageUnit[] packageUnits, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) - Since:
- 2.0
-
write
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
-
commit
void 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
-
rollback
void rollback()Note:write(InternalCommitContext, OMMonitor)
androllback()
could be called from different threads.- Since:
- 2.0
-
release
void release()
-