Package com._1c.g5.v8.internal.derived
Class BmDerivedDataInfoRepository
java.lang.Object
com._1c.g5.v8.internal.derived.BmDerivedDataInfoRepository
- All Implemented Interfaces:
IDerivedDataInfoRepository
Default implementation of
IDerivedDataInfoRepository
that uses persistent index to
store derived data info.-
Field Summary
Fields inherited from interface com._1c.g5.v8.internal.derived.IDerivedDataInfoRepository
SERVICE_NAME
-
Constructor Summary
Constructors -
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 version) Updates derived data info according to provided context
-
Constructor Details
-
Method Details
-
confirmSegmentComputation
Description copied from interface:IDerivedDataInfoRepository
Confirms computation of DD segment for the given object.- Specified by:
confirmSegmentComputation
in interfaceIDerivedDataInfoRepository
- Parameters:
objectId
- The identifier of the corresponding BM object.segmentId
- DD segment. Cannot benull
.
-
getAllInfos
Description copied from interface:IDerivedDataInfoRepository
Gets all registered info records from the repository- Specified by:
getAllInfos
in interfaceIDerivedDataInfoRepository
- Returns:
- An iterable with all remaining records. May not be
null
-
getInfo
Description copied from interface:IDerivedDataInfoRepository
Gets the registeredDerivedDataInfo
using the BM object identifier.- Specified by:
getInfo
in interfaceIDerivedDataInfoRepository
- 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
Description copied from interface:IDerivedDataInfoRepository
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.- Specified by:
getOrCreateInfo
in interfaceIDerivedDataInfoRepository
- Parameters:
objectId
- The identifier of the corresponding BM object.- Returns:
- The instance of the
DerivedDataInfo
holding the data for the given identifier, nevernull
.
-
markAsBroken
Description copied from interface:IDerivedDataInfoRepository
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.- Specified by:
markAsBroken
in interfaceIDerivedDataInfoRepository
- Parameters:
objectId
- The identifier of the corresponding BM object.
-
remove
Description copied from interface:IDerivedDataInfoRepository
Removes descriptor from the store.- Specified by:
remove
in interfaceIDerivedDataInfoRepository
- Parameters:
info
- The info to remove.
-
save
Description copied from interface:IDerivedDataInfoRepository
Saves the descriptor of DS for a specific object.- Specified by:
save
in interfaceIDerivedDataInfoRepository
- Parameters:
info
- The descriptor to save.
-
start
Description copied from interface:IDerivedDataInfoRepository
Starts the repository as the part of DD startup cycle.- Specified by:
start
in interfaceIDerivedDataInfoRepository
- Parameters:
delete
- The flag showing whether all the contents must be deleted.bmModel
- Corresponding BM model reference. May not benull
-
stop
public void stop(boolean delete) Description copied from interface:IDerivedDataInfoRepository
Stops the repository as the part of DD shutdown cycle.- Specified by:
stop
in interfaceIDerivedDataInfoRepository
- Parameters:
delete
- The flag showing whether all the contents must be deleted.
-
updateDerivedDataInfo
Description copied from interface:IDerivedDataInfoRepository
Updates derived data info according to provided context- Specified by:
updateDerivedDataInfo
in interfaceIDerivedDataInfoRepository
- Parameters:
context
- The provided context, may not benull
-
updateDerivedDataInfo
Description copied from interface:IDerivedDataInfoRepository
Updates derived data info according to provided context- Specified by:
updateDerivedDataInfo
in interfaceIDerivedDataInfoRepository
- Parameters:
context
- The provided context, may not benull
version
- The context creation timestamp
-
loadExistingContext
public IObjectDerivedDataContext loadExistingContext(Object objectId, String segmentId, DerivedDataInfo.SegmentContextData segmentData, IObjectContextFactory objectContextFactory) Description copied from interface:IDerivedDataInfoRepository
Loads an existing context with a data being stored in the repository- Specified by:
loadExistingContext
in interfaceIDerivedDataInfoRepository
- 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
Description copied from interface:IDerivedDataInfoRepository
Perform mass deactivation of contexts- Specified by:
deactivateContexts
in interfaceIDerivedDataInfoRepository
- Parameters:
segmentId
- Target segment of async. processing pipeline for the deactivationobjectContextFactory
- The object context creation factory. May not benull
-