Package com._1c.g5.v8.internal.derived
Interface IDerivedDataInfoRepository
- All Known Implementing Classes:
BmDerivedDataInfoRepository
public interface IDerivedDataInfoRepository
Interface for component responsible for
The implementation of this repository should return global modifiable instances of
DerivedDataInfo
persistence and management. The implementation of this repository should return global modifiable instances of
DerivedDataInfo
for
direct editing at the moment.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Service name (using in recovery orchestrator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
confirmSegmentComputation
(Object objectId, String segmentId) Confirms computation of DD segment for the given object.void
deactivateContexts
(String segmentId, IObjectContextFactory objectContextFactory) Perform mass deactivation of contextsGets all registered info records from the repositoryGets the registeredDerivedDataInfo
using the BM object identifier.getOrCreateInfo
(Object objectId) Gets the registeredDerivedDataInfo
using the BM object identifier.loadExistingContext
(Object objectId, String segmentId, DerivedDataInfo.SegmentContextData segmentData, IObjectContextFactory objectContextFactory) Loads an existing context with a data being stored in the repositoryvoid
markAsBroken
(Object objectId) Marks the correspondingDerivedDataInfo
as broken.void
remove
(DerivedDataInfo info) Removes descriptor from the store.void
save
(DerivedDataInfo info) Saves the descriptor of DS for a specific object.void
Starts the repository as the part of DD startup cycle.void
stop
(boolean delete) Stops the repository as the part of DD shutdown cycle.void
Updates derived data info according to provided contextvoid
updateDerivedDataInfo
(IObjectDerivedDataContext context, long timestamp) Updates derived data info according to provided context
-
Field Details
-
SERVICE_NAME
Service name (using in recovery orchestrator)- See Also:
-
-
Method Details
-
confirmSegmentComputation
Confirms computation of DD segment for the given object.- Parameters:
objectId
- The identifier of the corresponding BM object.segmentId
- DD segment. Cannot benull
.
-
getInfo
Gets the registeredDerivedDataInfo
using the BM object identifier.- Parameters:
objectId
- The identifier of the corresponding BM object.- Returns:
- The instance of the
DerivedDataInfo
holding the data for the given identifier.null
in case if there is no info registered for the given object identifier.
-
getOrCreateInfo
Gets the registeredDerivedDataInfo
using the BM object identifier. Creates a new instance in case if there is no info registered for the given object identifier.- Parameters:
objectId
- The identifier of the corresponding BM object.- Returns:
- The instance of the
DerivedDataInfo
holding the data for the given identifier, nevernull
.
-
getAllInfos
Iterable<DerivedDataInfo> getAllInfos()Gets all registered info records from the repository- Returns:
- An iterable with all remaining records. May not be
null
-
markAsBroken
Marks the correspondingDerivedDataInfo
as broken. Works only in case if the info is registered in the repository. Does nothing in case if no info is registered for the given object identifier.- Parameters:
objectId
- The identifier of the corresponding BM object.
-
remove
Removes descriptor from the store.- Parameters:
info
- The info to remove.
-
save
Saves the descriptor of DS for a specific object.- Parameters:
info
- The descriptor to save.
-
start
Starts the repository as the part of DD startup cycle.- Parameters:
delete
- The flag showing whether all the contents must be deleted.bmModel
- Corresponding BM model reference. May not benull
-
stop
void stop(boolean delete) Stops the repository as the part of DD shutdown cycle.- Parameters:
delete
- The flag showing whether all the contents must be deleted.
-
updateDerivedDataInfo
Updates derived data info according to provided context- Parameters:
context
- The provided context, may not benull
-
updateDerivedDataInfo
Updates derived data info according to provided context- Parameters:
context
- The provided context, may not benull
timestamp
- The context creation timestamp
-
loadExistingContext
IObjectDerivedDataContext loadExistingContext(Object objectId, String segmentId, DerivedDataInfo.SegmentContextData segmentData, IObjectContextFactory objectContextFactory) Loads an existing context with a data being stored in the repository- Parameters:
objectId
- A target object identifier. May not benull
segmentId
- A target object identifier. May not benull
segmentData
- A custom data of a context. May not benull
objectContextFactory
- The object context creation factory. May not benull
- Returns:
- Loaded async. computation context. Can be
null
in case if context doesn't exist
-
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
-