Interface IDerivedDataContextManager
- All Known Implementing Classes:
DerivedDataContextManager
public interface IDerivedDataContextManager
Derived data accumulation and state controlling facility.
Provides unified access for DD context accumulation facilities, convenience methods for context updates and context conflict resolution.
Provides unified access for DD context accumulation facilities, convenience methods for context updates and context conflict resolution.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears all global contexts in case if no unfinished DD computations/tasks are available.void
closeSession
(IContextCollectingSession session) Finishes processing of the session, removing all effective context locks.createContextCollectingSession
(Object computationCause) Create synchronous DD context collecting session.createContextCollectingSession
(Object computationCause, boolean trackWaitingScope) Create synchronous DD context collecting session.Creates a special context loading session that is used to process unfinished contexts during the start of EDT and schedule them to the DD pipelinevoid
deactivateContexts
(String segmentId) Perform mass deactivation of contextsvoid
Processes accumulated contexts (if any), sending corresponding DD context updates to the corresponding consumer (pipeline).void
Registers the context update listener.void
Removes previously registered listener.boolean
waitAccumulatedContextProcessing
(long timeout) The caller of this method waits on this method until all accumulated yet not processed DD context updates are being processed.
-
Method Details
-
closeSession
Finishes processing of the session, removing all effective context locks. -
createContextCollectingSession
Create synchronous DD context collecting session.- Parameters:
computationCause
- The cause of the computation (the context, usually a task, which requires sync. DD computation as a part of performed changes).- Returns:
- The corresponding DD context collecting session.
-
createContextLoadingSession
IContextCollectingSession createContextLoadingSession()Creates a special context loading session that is used to process unfinished contexts during the start of EDT and schedule them to the DD pipeline- Returns:
- The loading session. Cannot be
null
-
createContextCollectingSession
IContextCollectingSession createContextCollectingSession(Object computationCause, boolean trackWaitingScope) Create synchronous DD context collecting session.- Parameters:
computationCause
- The cause of the computation (the context, usually a task, which requires sync. DD computation as a part of performed changes).trackWaitingScope
- Enables tracking of implicit waiting context if true- Returns:
- The corresponding DD context collecting session.
-
registerContextUpdateListener
Registers the context update listener.- Parameters:
listener
- The listener to register.
-
unregisterContextUpdateListener
Removes previously registered listener.- Parameters:
listener
- The listener to remove.
-
processAccumulatedContexts
void processAccumulatedContexts()Processes accumulated contexts (if any), sending corresponding DD context updates to the corresponding consumer (pipeline). This method is not thread safe, the caller should guarantee the calls synchronization to ensure the propert order of accumulated context application -
waitAccumulatedContextProcessing
boolean waitAccumulatedContextProcessing(long timeout) The caller of this method waits on this method until all accumulated yet not processed DD context updates are being processed. This allows to be sure that the required scope (e.g. for waiting) is already known/or cleared to the DD after this call- Parameters:
timeout
- Wait timeout in ms. -1 means no timeout- Returns:
- True if waiting is successfull
-
clearOnEmptyPipeline
void clearOnEmptyPipeline()Clears all global contexts in case if no unfinished DD computations/tasks are available. Removes accumulation global contexts, etc. -
deactivateContexts
Perform mass deactivation of contexts- Parameters:
segmentId
- Target segment of async. processing pipeline for the deactivationobjectContextFactory
- The object context creation factory. May not benull
-