Package org.eclipse.emf.cdo.spi.server
Class StoreAccessorBase
- java.lang.Object
- 
- org.eclipse.net4j.util.event.Notifier
- 
- org.eclipse.net4j.util.lifecycle.Lifecycle
- 
- org.eclipse.emf.cdo.spi.server.StoreAccessorBase
 
 
 
- 
- All Implemented Interfaces:
- IQueryHandlerProvider,- IStoreAccessor,- InternalCDOBranchManager.BranchLoader,- InternalCDOCommitInfoManager.CommitInfoLoader,- org.eclipse.net4j.util.event.INotifier,- org.eclipse.net4j.util.event.INotifier.INotifier2,- org.eclipse.net4j.util.lifecycle.IDeactivateable,- org.eclipse.net4j.util.lifecycle.ILifecycle,- org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
 - Direct Known Subclasses:
- StoreAccessor
 
 public abstract class StoreAccessorBase extends org.eclipse.net4j.util.lifecycle.Lifecycle implements IStoreAccessor If the meaning of this type isn't clear, there really should be more of a description here...- Since:
- 4.0
- Author:
- Eike Stepper
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classStoreAccessorBase.CommitDataRevisionHandlerIf the meaning of this type isn't clear, there really should be more of a description here...- 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycleorg.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivation
 - 
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifierorg.eclipse.net4j.util.event.INotifier.INotifier2
 - 
Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranchManager.BranchLoaderInternalCDOBranchManager.BranchLoader.BranchInfo, InternalCDOBranchManager.BranchLoader.SubBranchInfo
 - 
Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.server.IStoreAccessorIStoreAccessor.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.BranchLoaderNEW_BRANCH, NEW_LOCAL_BRANCH
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedStoreAccessorBase(Store store, ISession session)protectedStoreAccessorBase(Store store, ITransaction transaction)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddIDMappings(InternalCommitContext commitContext, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Add ID mappings for all new objects of a transaction to the commit context.voidcommit(org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Flushes to the back-end and makes available the data for others.protected abstract voiddoCommit(org.eclipse.net4j.util.om.monitor.OMMonitor monitor)protected voiddoPassivate()protected abstract voiddoRollback(IStoreAccessor.CommitContext commitContext)protected voiddoUnpassivate()protected abstract voiddoWrite(InternalCommitContext context, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)protected abstract CDOIDgetNextCDOID(CDORevision revision)InternalSessiongetSession()Returns the session this accessor is associated with.StoregetStore()Returns the store this accessor is associated with.ITransactiongetTransaction()Returns the transaction this accessor is associated with ifIStoreAccessor.isReader()returnsfalse,nullotherwise.booleanisReader()Returnstrueif this accessor has been configured for read-only access to the back-end,falseotherwise.CDOCommitDataloadCommitData(long timeStamp)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.voidrelease()voidrollback()Note:IStoreAccessor.write(InternalCommitContext, OMMonitor)andIStoreAccessor.rollback()could be called from different threads.voidwrite(InternalCommitContext context, org.eclipse.net4j.util.om.monitor.OMMonitor monitor)Called before committing.- 
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycleactivate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
 - 
Methods inherited from class org.eclipse.net4j.util.event.NotifieraddListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.eclipse.net4j.util.event.INotifieraddListener, getListeners, hasListeners, removeListener
 - 
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.CommitInfoLoaderloadCommitInfos
 - 
Methods inherited from interface org.eclipse.emf.cdo.server.IQueryHandlerProvidergetQueryHandler
 - 
Methods inherited from interface org.eclipse.emf.cdo.server.IStoreAccessorcreateChunkReader, handleLobs, handleRevisions, loadLob, loadPackageUnit, queryLobs, queryResources, queryXRefs, readChangeSet, readPackageUnits, readRevision, readRevisionByVersion, writePackageUnits
 
- 
 
- 
- 
- 
Constructor Detail- 
StoreAccessorBaseprotected StoreAccessorBase(Store store, ITransaction transaction) 
 
- 
 - 
Method Detail- 
getStorepublic Store getStore() Description copied from interface:IStoreAccessorReturns the store this accessor is associated with.- Specified by:
- getStorein interface- IStoreAccessor
 
 - 
isReaderpublic boolean isReader() Description copied from interface:IStoreAccessorReturnstrueif this accessor has been configured for read-only access to the back-end,falseotherwise.- Specified by:
- isReaderin interface- IStoreAccessor
 
 - 
getSessionpublic InternalSession getSession() Description copied from interface:IStoreAccessorReturns the session this accessor is associated with.- Specified by:
- getSessionin interface- IStoreAccessor
- Since:
- 3.0
 
 - 
getTransactionpublic ITransaction getTransaction() Description copied from interface:IStoreAccessorReturns the transaction this accessor is associated with ifIStoreAccessor.isReader()returnsfalse,nullotherwise.- Specified by:
- getTransactionin interface- IStoreAccessor
 
 - 
releasepublic void release() - Specified by:
- releasein interface- IStoreAccessor
 
 - 
writepublic final void write(InternalCommitContext context, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Description copied from interface:IStoreAccessorCalled before committing. An instance of this accessor represents an instance of a back-end transaction. Could be called multiple times before commit it called.IStoreAccessor.commit(OMMonitor)orIStoreAccessor.rollback()will be called after any numbers ofIStoreAccessor.write(InternalCommitContext, OMMonitor).Note: IStoreAccessor.write(InternalCommitContext, OMMonitor)andIStoreAccessor.commit(OMMonitor)could be called from different threads.- Specified by:
- writein interface- IStoreAccessor
- Since:
- 3.0
 
 - 
doWriteprotected abstract void doWrite(InternalCommitContext context, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) 
 - 
commitpublic final void commit(org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Description copied from interface:IStoreAccessorFlushes to the back-end and makes available the data for others.Note: IStoreAccessor.write(InternalCommitContext, OMMonitor)andIStoreAccessor.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"); }- Specified by:
- commitin interface- IStoreAccessor
- Since:
- 3.0
 
 - 
doCommitprotected abstract void doCommit(org.eclipse.net4j.util.om.monitor.OMMonitor monitor) - Since:
- 3.0
 
 - 
rollbackpublic final void rollback() Description copied from interface:IStoreAccessorNote:IStoreAccessor.write(InternalCommitContext, OMMonitor)andIStoreAccessor.rollback()could be called from different threads.- Specified by:
- rollbackin interface- IStoreAccessor
 
 - 
doRollbackprotected abstract void doRollback(IStoreAccessor.CommitContext commitContext) 
 - 
readResourceIDpublic CDOID readResourceID(CDOID folderID, java.lang.String name, CDOBranchPoint branchPoint) Description copied from interface:IStoreAccessorReturns theCDOIDof the resource node with the given folderID and name if a resource with this folderID and name exists in the store,nullotherwise.- Specified by:
- readResourceIDin interface- IStoreAccessor
- Since:
- 3.0
 
 - 
loadCommitDatapublic CDOCommitData loadCommitData(long timeStamp) - Specified by:
- loadCommitDatain interface- InternalCDOCommitInfoManager.CommitInfoLoader
- Since:
- 3.0
 
 - 
addIDMappingspublic void addIDMappings(InternalCommitContext commitContext, org.eclipse.net4j.util.om.monitor.OMMonitor monitor) Add ID mappings for all new objects of a transaction to the commit context. The implementor must, for each new object of the commit context, determine a permanent CDOID and make it known to the context by callingInternalCommitContext.addIDMapping(CDOID, CDOID).- Since:
- 3.0
 
 - 
getNextCDOIDprotected abstract CDOID getNextCDOID(CDORevision revision) 
 - 
doPassivateprotected void doPassivate() throws java.lang.Exception- Throws:
- java.lang.Exception
 
 - 
doUnpassivateprotected void doUnpassivate() throws java.lang.Exception- Throws:
- java.lang.Exception
 
 
- 
 
-