Class Store
- All Implemented Interfaces:
IStore,InternalStore,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:
LongIDStore
- Since:
- 2.0
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
org.eclipse.net4j.util.lifecycle.ILifecycle.DeferrableActivationNested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
org.eclipse.net4j.util.event.INotifier.INotifier2Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.spi.server.InternalStore
InternalStore.NoChangeSets, InternalStore.NoCommitInfos, InternalStore.NoDurableLocking, InternalStore.NoExternalReferences, InternalStore.NoFeatureMaps, InternalStore.NoHandleRevisions, InternalStore.NoLargeObjects, InternalStore.NoQueryXRefs, InternalStore.NoRawAccessNested classes/interfaces inherited from interface org.eclipse.emf.cdo.server.IStore
IStore.CanHandleClientAssignedIDs, IStore.ChangeFormat, IStore.RevisionParallelism, IStore.RevisionTemporality -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDeprecated.Use CDOBranchPoint.UNSPECIFIED_DATEFields inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
USE_LABEL -
Constructor Summary
ConstructorsConstructorDescriptionStore(String type, Set<CDOID.ObjectType> objectIDTypes, Set<IStore.ChangeFormat> supportedChangeFormats, Set<IStore.RevisionTemporality> supportedRevisionTemporalities, Set<IStore.RevisionParallelism> supportedRevisionParallelisms) -
Method Summary
Modifier and TypeMethodDescriptioncreateExactMatchContext(CDOID folderID, String name, CDOBranchPoint branchPoint) protected abstract IStoreAccessorcreateReader(ISession session) Creates and returns a newIStoreAccessorinstance.createRevision(EClass eClass, CDOID id) protected abstract IStoreAccessorcreateWriter(ITransaction transaction) Creates and returns a newIStoreAccessorinstance.org.eclipse.net4j.util.om.monitor.ProgressDistributorintReturns the id of the last branch that has been created in this store.longReturns the time stamp of the last successful commit operation.intReturns the id of the last local branch that has been created in this store.longReturns the time stamp of the last successful commit operation to a non-localbranch.intintReturns a reader that can be used to read from this store in the context of the given session.protected abstract StoreAccessorPoolgetReaderPool(ISession session, boolean forReleasing) Returns apoolthat may containIStoreAccessorinstances that are compatible with the given session.final Set<IStore.RevisionParallelism>final StringgetType()getWriter(ITransaction transaction) Returns a writer that can be used to write to this store in the context of the given view.protected abstract StoreAccessorPoolgetWriterPool(IView view, boolean forReleasing) Returns apoolthat may containIStoreAccessorinstances that are compatible with the given session.static StringidToString(CDOID id) booleanprotected voidreleaseAccessor(StoreAccessorBase accessor) protected static <T> Set<T>set(T... elements) voidsetDropAllDataOnActivate(boolean dropAllDataOnActivate) voidsetLastBranchID(int lastBranchID) voidsetLastCommitTime(long lastCommitTime) voidsetLastLocalBranchID(int lastLocalBranchID) voidsetLastNonLocalCommitTime(long lastNonLocalCommitTime) protected voidsetObjectIDTypes(Set<CDOID.ObjectType> objectIDTypes) voidsetRepository(IRepository repository) voidsetRevisionParallelism(IStore.RevisionParallelism revisionParallelism) voidsetRevisionTemporality(IStore.RevisionTemporality revisionTemporality) static CDOIDstringToID(String string) Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toStringMethods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
activate, deactivate, getLifecycleState, isActiveMethods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListenerMethods inherited from interface org.eclipse.emf.cdo.spi.server.InternalStore
isLocal, setCreationTimeMethods inherited from interface org.eclipse.emf.cdo.server.IStore
createObjectID, getCreationTime, getPersistentProperties, isFirstStart, removePersistentProperties, setPersistentProperties
-
Field Details
-
UNSPECIFIED_DATE
Deprecated.Use CDOBranchPoint.UNSPECIFIED_DATE- Since:
- 3.0
- See Also:
-
-
Constructor Details
-
Store
public Store(String type, Set<CDOID.ObjectType> objectIDTypes, Set<IStore.ChangeFormat> supportedChangeFormats, Set<IStore.RevisionTemporality> supportedRevisionTemporalities, Set<IStore.RevisionParallelism> supportedRevisionParallelisms) - Since:
- 3.0
-
Store
- Since:
- 4.2
-
-
Method Details
-
getType
-
getObjectIDTypes
- Specified by:
getObjectIDTypesin interfaceIStore- Since:
- 3.0
-
setObjectIDTypes
- Since:
- 4.0
-
getSupportedChangeFormats
- Specified by:
getSupportedChangeFormatsin interfaceIStore
-
getSupportedRevisionTemporalities
- Specified by:
getSupportedRevisionTemporalitiesin interfaceIStore
-
getSupportedRevisionParallelisms
- Specified by:
getSupportedRevisionParallelismsin interfaceIStore
-
getRevisionTemporality
- Specified by:
getRevisionTemporalityin interfaceIStore
-
setRevisionTemporality
- Specified by:
setRevisionTemporalityin interfaceInternalStore
-
getRevisionParallelism
- Specified by:
getRevisionParallelismin interfaceIStore
-
setRevisionParallelism
- Specified by:
setRevisionParallelismin interfaceInternalStore
-
getRepository
- Specified by:
getRepositoryin interfaceInternalStore- Specified by:
getRepositoryin interfaceIStore- Since:
- 3.0
-
setRepository
- Specified by:
setRepositoryin interfaceInternalStore
-
isDropAllDataOnActivate
public boolean isDropAllDataOnActivate()- Specified by:
isDropAllDataOnActivatein interfaceInternalStore- Since:
- 4.0
-
setDropAllDataOnActivate
public void setDropAllDataOnActivate(boolean dropAllDataOnActivate) - Specified by:
setDropAllDataOnActivatein interfaceInternalStore- Since:
- 4.0
-
getLastBranchID
public int getLastBranchID()Description copied from interface:IStoreReturns the id of the last branch that has been created in this store.- Specified by:
getLastBranchIDin interfaceIStore- Since:
- 3.0
-
setLastBranchID
public void setLastBranchID(int lastBranchID) - Specified by:
setLastBranchIDin interfaceInternalStore- Since:
- 3.0
-
getNextBranchID
public int getNextBranchID()- Specified by:
getNextBranchIDin interfaceInternalStore- Since:
- 3.0
-
getLastLocalBranchID
public int getLastLocalBranchID()Description copied from interface:IStoreReturns the id of the last local branch that has been created in this store.- Specified by:
getLastLocalBranchIDin interfaceIStore- Since:
- 3.0
-
setLastLocalBranchID
public void setLastLocalBranchID(int lastLocalBranchID) - Specified by:
setLastLocalBranchIDin interfaceInternalStore- Since:
- 3.0
-
getNextLocalBranchID
public int getNextLocalBranchID()- Specified by:
getNextLocalBranchIDin interfaceInternalStore- Since:
- 3.0
-
getLastCommitTime
public long getLastCommitTime()Description copied from interface:IStoreReturns the time stamp of the last successful commit operation.- Specified by:
getLastCommitTimein interfaceIStore- Since:
- 3.0
-
setLastCommitTime
public void setLastCommitTime(long lastCommitTime) - Specified by:
setLastCommitTimein interfaceInternalStore- Since:
- 3.0
-
getLastNonLocalCommitTime
public long getLastNonLocalCommitTime()Description copied from interface:IStoreReturns the time stamp of the last successful commit operation to a non-localbranch.- Specified by:
getLastNonLocalCommitTimein interfaceIStore- Since:
- 3.0
-
setLastNonLocalCommitTime
public void setLastNonLocalCommitTime(long lastNonLocalCommitTime) - Specified by:
setLastNonLocalCommitTimein interfaceInternalStore- Since:
- 3.0
-
getReader
Description copied from interface:IStoreReturns a reader that can be used to read from this store in the context of the given session.- Specified by:
getReaderin interfaceIStore- Parameters:
session- The session that should be used as a context for read access ornull. 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 aLifecycleEventAdapterwith it to intercept cleanup on session close. Note however that the session can benull, for example during startup of the server while the repositories are initialized but before any user session has been opened.- Returns:
- a reader that can be used to read from this store in the context of the given session, never
null.
-
getWriter
Description copied from interface:IStoreReturns a writer that can be used to write to this store in the context of the given view. The given view is always marked as a transaction.- Specified by:
getWriterin interfaceIStore- Parameters:
transaction- 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 aLifecycleEventAdapterwith it to intercept cleanup on view close.- Returns:
- a writer that can be used to write to this store in the context of the given view, never
null.
-
getIndicatingCommitDistributor
public org.eclipse.net4j.util.om.monitor.ProgressDistributor getIndicatingCommitDistributor()- Specified by:
getIndicatingCommitDistributorin interfaceIStore
-
createRevision
- Since:
- 3.0
-
releaseAccessor
- Since:
- 4.0
-
getReaderPool
Returns apoolthat may containIStoreAccessorinstances that are compatible with the given session. The implementor may returnnullto 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
REMOVEDevents sent by either theISessionManager(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 silently without firing respective events!- Parameters:
session- The context which the pool must be compatible with. Must not benull.forReleasing- Enables lazy pool creation. The implementor is not supposed to create a new pool iffalseis passed. Iftrueis passed it's up to the implementor whether to create a new pool or not.
-
getWriterPool
Returns apoolthat may containIStoreAccessorinstances that are compatible with the given session. The implementor may returnnullto 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
REMOVEDevents sent by either theISessionManager(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!- Parameters:
view- The context which the pool must be compatible with. Must not benull.forReleasing- Enables lazy pool creation. The implementor is not supposed to create a new pool iffalseis passed. Iftrueis passed it's up to the implementor whether to create a new pool or not.
-
createReader
Creates and returns a newIStoreAccessorinstance. The caller of this method is responsible foractivatingthe new instance. -
createWriter
Creates and returns a newIStoreAccessorinstance. The caller of this method is responsible foractivatingthe new instance. -
set
-
idToString
- Since:
- 4.0
-
stringToID
- Since:
- 4.0
-
createExactMatchContext
public static IStoreAccessor.QueryResourcesContext.ExactMatch createExactMatchContext(CDOID folderID, String name, CDOBranchPoint branchPoint) - Since:
- 3.0
-