public abstract class StoreAccessorBase extends Lifecycle implements IStoreAccessor
| Modifier and Type | Class and Description |
|---|---|
static class |
StoreAccessorBase.CommitDataRevisionHandler
If the meaning of this type isn't clear, there really should be more of a description here...
|
IStoreAccessor.CommitContext, IStoreAccessor.DurableLocking, IStoreAccessor.DurableLocking2, IStoreAccessor.QueryResourcesContext, IStoreAccessor.QueryXRefsContext, IStoreAccessor.Raw, IStoreAccessor.Raw2, IStoreAccessor.UnitSupportInternalCDOBranchManager.BranchLoader.BranchInfo, InternalCDOBranchManager.BranchLoader.SubBranchInfoILifecycle.DeferrableActivationNEW_BRANCH, NEW_LOCAL_BRANCH| Modifier | Constructor and Description |
|---|---|
protected |
StoreAccessorBase(Store store,
ISession session) |
protected |
StoreAccessorBase(Store store,
ITransaction transaction) |
| Modifier and Type | Method and Description |
|---|---|
void |
addIDMappings(InternalCommitContext commitContext,
OMMonitor monitor)
Add ID mappings for all new objects of a transaction to the commit context.
|
void |
commit(OMMonitor monitor)
Flushes to the back-end and makes available the data for others.
|
protected abstract void |
doCommit(OMMonitor monitor) |
protected void |
doPassivate() |
protected abstract void |
doRollback(IStoreAccessor.CommitContext commitContext) |
protected void |
doUnpassivate() |
protected abstract void |
doWrite(InternalCommitContext context,
OMMonitor monitor) |
protected abstract CDOID |
getNextCDOID(CDORevision revision) |
InternalSession |
getSession()
Returns the session this accessor is associated with.
|
Store |
getStore()
Returns the store this accessor is associated with.
|
ITransaction |
getTransaction()
Returns the transaction this accessor is associated with if
IStoreAccessor.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. |
CDOCommitData |
loadCommitData(long timeStamp) |
CDOID |
readResourceID(CDOID folderID,
java.lang.String name,
CDOBranchPoint branchPoint)
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. |
void |
release() |
void |
rollback()
Note:
IStoreAccessor.write(InternalCommitContext, OMMonitor) and IStoreAccessor.rollback()
could be called from different threads. |
void |
write(InternalCommitContext context,
OMMonitor monitor)
Called before committing.
|
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringaddListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListeners, lastListenerRemoved, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateChunkReader, handleLobs, handleRevisions, loadLob, loadPackageUnit, queryLobs, queryResources, queryXRefs, readChangeSet, readPackageUnits, readRevision, readRevisionByVersion, writePackageUnitsgetQueryHandlercreateBranch, loadBranch, loadBranches, loadSubBranchesloadCommitInfosaddListener, getListeners, hasListeners, removeListenerprotected StoreAccessorBase(Store store, ITransaction transaction)
public Store getStore()
IStoreAccessorgetStore in interface IStoreAccessorpublic boolean isReader()
IStoreAccessortrue if this accessor has been configured for read-only access to the back-end,
false otherwise.isReader in interface IStoreAccessorpublic InternalSession getSession()
IStoreAccessorgetSession in interface IStoreAccessorpublic ITransaction getTransaction()
IStoreAccessorIStoreAccessor.isReader() returns false,
null otherwise.getTransaction in interface IStoreAccessorpublic void release()
release in interface IStoreAccessorpublic final void write(InternalCommitContext context, OMMonitor monitor)
IStoreAccessorIStoreAccessor.commit(OMMonitor) or
IStoreAccessor.rollback() will be called after any numbers of
IStoreAccessor.write(InternalCommitContext, OMMonitor).
Note: IStoreAccessor.write(InternalCommitContext, OMMonitor) and
IStoreAccessor.commit(OMMonitor) could be called from different threads.
write in interface IStoreAccessorprotected abstract void doWrite(InternalCommitContext context, OMMonitor monitor)
public final void commit(OMMonitor monitor)
IStoreAccessor
Note: IStoreAccessor.write(InternalCommitContext, OMMonitor) and
IStoreAccessor.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");
}
commit in interface IStoreAccessorprotected abstract void doCommit(OMMonitor monitor)
public final void rollback()
IStoreAccessorIStoreAccessor.write(InternalCommitContext, OMMonitor) and IStoreAccessor.rollback()
could be called from different threads.rollback in interface IStoreAccessorprotected abstract void doRollback(IStoreAccessor.CommitContext commitContext)
public CDOID readResourceID(CDOID folderID, java.lang.String name, CDOBranchPoint branchPoint)
IStoreAccessorCDOID of the resource node with the given folderID and name if a resource with this
folderID and name exists in the store, null otherwise.readResourceID in interface IStoreAccessorpublic CDOCommitData loadCommitData(long timeStamp)
loadCommitData in interface InternalCDOCommitInfoManager.CommitInfoLoaderpublic void addIDMappings(InternalCommitContext commitContext, OMMonitor monitor)
InternalCommitContext.addIDMapping(CDOID, CDOID).protected abstract CDOID getNextCDOID(CDORevision revision)
protected void doPassivate()
throws java.lang.Exception
java.lang.Exceptionprotected void doUnpassivate()
throws java.lang.Exception
java.lang.ExceptionCopyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html