public abstract class Store extends Lifecycle implements InternalStore
InternalStore.NoChangeSets, InternalStore.NoCommitInfos, InternalStore.NoDurableLocking, InternalStore.NoExternalReferences, InternalStore.NoFeatureMaps, InternalStore.NoHandleRevisions, InternalStore.NoLargeObjects, InternalStore.NoQueryXRefs, InternalStore.NoRawAccessIStore.CanHandleClientAssignedIDs, IStore.ChangeFormat, IStore.RevisionParallelism, IStore.RevisionTemporalityILifecycle.DeferrableActivation| Modifier and Type | Field and Description |
|---|---|
static long |
UNSPECIFIED_DATE
Deprecated.
Use CDOBranchPoint.UNSPECIFIED_DATE
|
| Constructor and Description |
|---|
Store(java.lang.String type) |
Store(java.lang.String type,
java.util.Set<CDOID.ObjectType> objectIDTypes,
java.util.Set<IStore.ChangeFormat> supportedChangeFormats,
java.util.Set<IStore.RevisionTemporality> supportedRevisionTemporalities,
java.util.Set<IStore.RevisionParallelism> supportedRevisionParallelisms) |
| Modifier and Type | Method and Description |
|---|---|
static IStoreAccessor.QueryResourcesContext.ExactMatch |
createExactMatchContext(CDOID folderID,
java.lang.String name,
CDOBranchPoint branchPoint) |
protected abstract IStoreAccessor |
createReader(ISession session)
Creates and returns a new
IStoreAccessor instance. |
InternalCDORevision |
createRevision(EClass eClass,
CDOID id) |
protected abstract IStoreAccessor |
createWriter(ITransaction transaction)
Creates and returns a new
IStoreAccessor instance. |
ProgressDistributor |
getIndicatingCommitDistributor() |
int |
getLastBranchID()
Returns the id of the last branch that has been created in this store.
|
long |
getLastCommitTime()
Returns the time stamp of the last successful commit operation.
|
int |
getLastLocalBranchID()
Returns the id of the last local branch that has been created in this store.
|
long |
getLastNonLocalCommitTime()
Returns the time stamp of the last successful commit operation to a non-local
branch. |
int |
getNextBranchID() |
int |
getNextLocalBranchID() |
java.util.Set<CDOID.ObjectType> |
getObjectIDTypes() |
IStoreAccessor |
getReader(ISession session)
Returns a reader that can be used to read from this store in the context of the given session.
|
protected abstract StoreAccessorPool |
getReaderPool(ISession session,
boolean forReleasing)
Returns a
pool that may contain IStoreAccessor instances that are compatible with
the given session. |
InternalRepository |
getRepository() |
IStore.RevisionParallelism |
getRevisionParallelism() |
IStore.RevisionTemporality |
getRevisionTemporality() |
java.util.Set<IStore.ChangeFormat> |
getSupportedChangeFormats() |
java.util.Set<IStore.RevisionParallelism> |
getSupportedRevisionParallelisms() |
java.util.Set<IStore.RevisionTemporality> |
getSupportedRevisionTemporalities() |
java.lang.String |
getType() |
IStoreAccessor |
getWriter(ITransaction transaction)
Returns a writer that can be used to write to this store in the context of the given view.
|
protected abstract StoreAccessorPool |
getWriterPool(IView view,
boolean forReleasing)
Returns a
pool that may contain IStoreAccessor instances that are compatible with
the given session. |
static java.lang.String |
idToString(CDOID id) |
boolean |
isDropAllDataOnActivate() |
protected void |
releaseAccessor(StoreAccessorBase accessor) |
protected static <T> java.util.Set<T> |
set(T... elements) |
void |
setDropAllDataOnActivate(boolean dropAllDataOnActivate) |
void |
setLastBranchID(int lastBranchID) |
void |
setLastCommitTime(long lastCommitTime) |
void |
setLastLocalBranchID(int lastLocalBranchID) |
void |
setLastNonLocalCommitTime(long lastNonLocalCommitTime) |
protected void |
setObjectIDTypes(java.util.Set<CDOID.ObjectType> objectIDTypes) |
void |
setRepository(IRepository repository) |
void |
setRevisionParallelism(IStore.RevisionParallelism revisionParallelism) |
void |
setRevisionTemporality(IStore.RevisionTemporality revisionTemporality) |
static CDOID |
stringToID(java.lang.String string) |
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, waitisLocal, setCreationTimecreateObjectID, getCreationTime, getPersistentProperties, isFirstStart, removePersistentProperties, setPersistentPropertiesactivate, deactivate, getLifecycleState, isActiveaddListener, getListeners, hasListeners, removeListener@Deprecated public static final long UNSPECIFIED_DATE
public Store(java.lang.String type,
java.util.Set<CDOID.ObjectType> objectIDTypes,
java.util.Set<IStore.ChangeFormat> supportedChangeFormats,
java.util.Set<IStore.RevisionTemporality> supportedRevisionTemporalities,
java.util.Set<IStore.RevisionParallelism> supportedRevisionParallelisms)
public Store(java.lang.String type)
public java.util.Set<CDOID.ObjectType> getObjectIDTypes()
getObjectIDTypes in interface IStoreprotected void setObjectIDTypes(java.util.Set<CDOID.ObjectType> objectIDTypes)
public java.util.Set<IStore.ChangeFormat> getSupportedChangeFormats()
getSupportedChangeFormats in interface IStorepublic java.util.Set<IStore.RevisionTemporality> getSupportedRevisionTemporalities()
getSupportedRevisionTemporalities in interface IStorepublic final java.util.Set<IStore.RevisionParallelism> getSupportedRevisionParallelisms()
getSupportedRevisionParallelisms in interface IStorepublic IStore.RevisionTemporality getRevisionTemporality()
getRevisionTemporality in interface IStorepublic void setRevisionTemporality(IStore.RevisionTemporality revisionTemporality)
setRevisionTemporality in interface InternalStorepublic IStore.RevisionParallelism getRevisionParallelism()
getRevisionParallelism in interface IStorepublic void setRevisionParallelism(IStore.RevisionParallelism revisionParallelism)
setRevisionParallelism in interface InternalStorepublic InternalRepository getRepository()
getRepository in interface IStoregetRepository in interface InternalStorepublic void setRepository(IRepository repository)
setRepository in interface InternalStorepublic boolean isDropAllDataOnActivate()
isDropAllDataOnActivate in interface InternalStorepublic void setDropAllDataOnActivate(boolean dropAllDataOnActivate)
setDropAllDataOnActivate in interface InternalStorepublic int getLastBranchID()
IStoregetLastBranchID in interface IStorepublic void setLastBranchID(int lastBranchID)
setLastBranchID in interface InternalStorepublic int getNextBranchID()
getNextBranchID in interface InternalStorepublic int getLastLocalBranchID()
IStoregetLastLocalBranchID in interface IStorepublic void setLastLocalBranchID(int lastLocalBranchID)
setLastLocalBranchID in interface InternalStorepublic int getNextLocalBranchID()
getNextLocalBranchID in interface InternalStorepublic long getLastCommitTime()
IStoregetLastCommitTime in interface IStorepublic void setLastCommitTime(long lastCommitTime)
setLastCommitTime in interface InternalStorepublic long getLastNonLocalCommitTime()
IStorebranch.getLastNonLocalCommitTime in interface IStorepublic void setLastNonLocalCommitTime(long lastNonLocalCommitTime)
setLastNonLocalCommitTime in interface InternalStorepublic IStoreAccessor getReader(ISession session)
IStoregetReader in interface IStoresession - The session that should be used as a context for read access or null. The store implementor
is free to interpret and use the session in a manner suitable for him or ignore it at all. It is meant
only as a hint. Implementor can use it as a key into a cache and/or register a
LifecycleEventAdapter with it to intercept
cleanup on session close. Note however that the session can be null, for example during
startup of the server while the repositories are initialized but before any user session has been opened.null.public IStoreAccessor getWriter(ITransaction transaction)
IStoregetWriter in interface IStoretransaction - The view that must be used as a context for write access. The store implementor is free to interpret and
use the view in a manner suitable for him or ignore it at all. It is meant only as a hint. Implementor can
use it as a key into a cache and/or register a
LifecycleEventAdapter with it to intercept
cleanup on view close.null.public ProgressDistributor getIndicatingCommitDistributor()
getIndicatingCommitDistributor in interface IStorepublic InternalCDORevision createRevision(EClass eClass, CDOID id)
protected void releaseAccessor(StoreAccessorBase accessor)
protected abstract StoreAccessorPool getReaderPool(ISession session, boolean forReleasing)
pool that may contain IStoreAccessor instances that are compatible with
the given session. The implementor may return null to indicate that no pooling occurs. It's also left
to the implementors choice how to determine the appropriate pool instance to be used for the given session, for
example it could always return the same pool instance, regardless of the given session.
If the implementor of this method decides to create pools that are only compatible with certain sessions or views,
then it is his responsibility to listen to REMOVED events sent by either the
ISessionManager (indicating that a session is closed) or any of its sessions (indicating that a view is
closed). Note: Closing a session implies that all contained views are closed sliently without
firing respective events!
session - The context which the pool must be compatible with. Must not be null.forReleasing - Enables lazy pool creation. The implementor is not supposed to create a new pool if false is
passed. If true is passed it's up to the implementor whether to create a new pool or not.protected abstract StoreAccessorPool getWriterPool(IView view, boolean forReleasing)
pool that may contain IStoreAccessor instances that are compatible with
the given session. The implementor may return null to indicate that no pooling occurs. It's also left
to the implementors choice how to determine the appropriate pool instance to be used for the given session, for
example it could always return the same pool instance, regardless of the given session.
If the implementor of this method decides to create pools that are only compatible with certain sessions or views,
then it is his responsibility to listen to REMOVED events sent by either the
ISessionManager (indicating that a session is closed) or any of its sessions (indicating that a view is
closed). Note: Closing a session implies that all contained views are closed sliently without
firing respective events!
view - The context which the pool must be compatible with. Must not be null.forReleasing - Enables lazy pool creation. The implementor is not supposed to create a new pool if false is
passed. If true is passed it's up to the implementor whether to create a new pool or not.protected abstract IStoreAccessor createReader(ISession session)
IStoreAccessor instance. The caller of this method is responsible for
activating the new instance.protected abstract IStoreAccessor createWriter(ITransaction transaction)
IStoreAccessor instance. The caller of this method is responsible for
activating the new instance.@SafeVarargs protected static <T> java.util.Set<T> set(T... elements)
public static java.lang.String idToString(CDOID id)
public static CDOID stringToID(java.lang.String string)
public static IStoreAccessor.QueryResourcesContext.ExactMatch createExactMatchContext(CDOID folderID, java.lang.String name, CDOBranchPoint branchPoint)
Copyright (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