|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IStoreAccessor
| Nested Class Summary | |
|---|---|
static interface |
IStoreAccessor.AdditionalRevisionCache
|
static interface |
IStoreAccessor.CommitContext
Represents the state of a single, logical commit operation which is driven through multiple calls to several methods on the IStoreAccessor API. |
static interface |
IStoreAccessor.QueryResourcesContext
|
| Method Summary | |
|---|---|
void |
commit(org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
Flushes to the back-end and makes available the data for others. |
IStoreChunkReader |
createChunkReader(InternalCDORevision revision,
org.eclipse.emf.ecore.EStructuralFeature feature)
|
ISession |
getSession()
Returns the session this accessor is associated with. |
IStore |
getStore()
Returns the store this accessor is associated with. |
ITransaction |
getTransaction()
Returns the transaction this accessor is associated with if isReader() returns false,
null otherwise. |
boolean |
isReader()
Returns true if this accessor has been configured for read-only access to the back-end,
false otherwise. |
org.eclipse.emf.ecore.EPackage[] |
loadPackageUnit(InternalCDOPackageUnit packageUnit)
Demand loads a given package proxy that has been created on startup of the repository. |
void |
queryResources(IStoreAccessor.QueryResourcesContext context)
|
java.util.Collection<InternalCDOPackageUnit> |
readPackageUnits()
|
CDOID |
readResourceID(CDOID folderID,
java.lang.String name,
long timeStamp)
Returns the CDOID of the resource node with the given folderID and name if a resource with this
folderID and name exists in the store, null otherwise. |
InternalCDORevision |
readRevision(CDOID id,
int listChunk,
IStoreAccessor.AdditionalRevisionCache cache)
Reads a current revision (i.e. one with revised == 0) from the back-end. |
InternalCDORevision |
readRevisionByTime(CDOID id,
int listChunk,
IStoreAccessor.AdditionalRevisionCache cache,
long timeStamp)
Reads a revision from the back-end that was valid at the given timeStamp. |
InternalCDORevision |
readRevisionByVersion(CDOID id,
int listChunk,
IStoreAccessor.AdditionalRevisionCache cache,
int version)
Reads a revision with the given version from the back-end. |
void |
refreshRevisions()
TODO Clarify the meaning of refreshRevisions() |
void |
release()
|
void |
rollback()
Note: write(CommitContext, OMMonitor) and rollback() could be
called from different threads. |
InternalCDORevision |
verifyRevision(InternalCDORevision revision)
|
void |
write(IStoreAccessor.CommitContext 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.server.IQueryHandlerProvider |
|---|
getQueryHandler |
| Method Detail |
|---|
IStore getStore()
void release()
boolean isReader()
true if this accessor has been configured for read-only access to the back-end,
false otherwise.
ISession getSession()
IStoreChunkReader createChunkReader(InternalCDORevision revision,
org.eclipse.emf.ecore.EStructuralFeature feature)
java.util.Collection<InternalCDOPackageUnit> readPackageUnits()
org.eclipse.emf.ecore.EPackage[] loadPackageUnit(InternalCDOPackageUnit packageUnit)
It's left to the implementor's choice whether to load the ecore xml at this time
already. In case it is not loaded at this time readPackageEcore() is
called later on demand.
This method must only load the given package, not possible contained packages.
InternalEPackage
InternalCDORevision readRevision(CDOID id,
int listChunk,
IStoreAccessor.AdditionalRevisionCache cache)
null if the id is
invalid.
InternalCDORevision readRevisionByVersion(CDOID id,
int listChunk,
IStoreAccessor.AdditionalRevisionCache cache,
int version)
IRepository.isSupportingAudits() is true. Returns null if the id is invalid.
InternalCDORevision readRevisionByTime(CDOID id,
int listChunk,
IStoreAccessor.AdditionalRevisionCache cache,
long timeStamp)
IRepository.isSupportingAudits() is true. Returns null if the id is
invalid.
CDOID readResourceID(CDOID folderID,
java.lang.String name,
long timeStamp)
CDOID of the resource node with the given folderID and name if a resource with this
folderID and name exists in the store, null otherwise.
InternalCDORevision verifyRevision(InternalCDORevision revision)
void refreshRevisions()
refreshRevisions()
void queryResources(IStoreAccessor.QueryResourcesContext context)
ITransaction getTransaction()
isReader() returns false,
null otherwise.
void writePackageUnits(InternalCDOPackageUnit[] packageUnits,
org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
void write(IStoreAccessor.CommitContext context,
org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
commit(OMMonitor) or
rollback() will be called after any numbers of
write(CommitContext, OMMonitor).
Note: write(CommitContext, OMMonitor) and commit(OMMonitor)
could be called from different threads.
void commit(org.eclipse.net4j.util.om.monitor.OMMonitor monitor)
Note: write(CommitContext, OMMonitor) and commit(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");
}
void rollback()
write(CommitContext, OMMonitor) and rollback() could be
called from different threads.
|
Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||