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 TypeMethodDescriptionvoidconfirmSegmentComputation(Object objectId, String segmentId) Confirms computation of DD segment for the given object.voiddeactivateContexts(String segmentId, IObjectContextFactory objectContextFactory) Perform mass deactivation of contextsGets all registered info records from the repositoryGets the registeredDerivedDataInfousing the BM object identifier.getOrCreateInfo(Object objectId) Gets the registeredDerivedDataInfousing 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 repositoryvoidmarkAsBroken(Object objectId) Marks the correspondingDerivedDataInfoas broken.voidremove(DerivedDataInfo info) Removes descriptor from the store.voidsave(DerivedDataInfo info) Saves the descriptor of DS for a specific object.voidStarts the repository as the part of DD startup cycle.voidstop(boolean delete) Stops the repository as the part of DD shutdown cycle.voidUpdates derived data info according to provided contextvoidupdateDerivedDataInfo(IObjectDerivedDataContext context, long version) Updates derived data info according to provided context
-
Constructor Details
-
Method Details
-
confirmSegmentComputation
Description copied from interface:IDerivedDataInfoRepositoryConfirms computation of DD segment for the given object.- Specified by:
confirmSegmentComputationin interfaceIDerivedDataInfoRepository- Parameters:
objectId- The identifier of the corresponding BM object.segmentId- DD segment. Cannot benull.
-
getAllInfos
Description copied from interface:IDerivedDataInfoRepositoryGets all registered info records from the repository- Specified by:
getAllInfosin interfaceIDerivedDataInfoRepository- Returns:
- An iterable with all remaining records. May not be
null
-
getInfo
Description copied from interface:IDerivedDataInfoRepositoryGets the registeredDerivedDataInfousing the BM object identifier.- Specified by:
getInfoin interfaceIDerivedDataInfoRepository- Parameters:
objectId- The identifier of the corresponding BM object.- Returns:
- The instance of the
DerivedDataInfoholding the data for the given identifier.nullin case if there is no info registered for the given object identifier.
-
getOrCreateInfo
Description copied from interface:IDerivedDataInfoRepositoryGets the registeredDerivedDataInfousing the BM object identifier. Creates a new instance in case if there is no info registered for the given object identifier.- Specified by:
getOrCreateInfoin interfaceIDerivedDataInfoRepository- Parameters:
objectId- The identifier of the corresponding BM object.- Returns:
- The instance of the
DerivedDataInfoholding the data for the given identifier, nevernull.
-
markAsBroken
Description copied from interface:IDerivedDataInfoRepositoryMarks the correspondingDerivedDataInfoas 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:
markAsBrokenin interfaceIDerivedDataInfoRepository- Parameters:
objectId- The identifier of the corresponding BM object.
-
remove
Description copied from interface:IDerivedDataInfoRepositoryRemoves descriptor from the store.- Specified by:
removein interfaceIDerivedDataInfoRepository- Parameters:
info- The info to remove.
-
save
Description copied from interface:IDerivedDataInfoRepositorySaves the descriptor of DS for a specific object.- Specified by:
savein interfaceIDerivedDataInfoRepository- Parameters:
info- The descriptor to save.
-
start
Description copied from interface:IDerivedDataInfoRepositoryStarts the repository as the part of DD startup cycle.- Specified by:
startin 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:IDerivedDataInfoRepositoryStops the repository as the part of DD shutdown cycle.- Specified by:
stopin interfaceIDerivedDataInfoRepository- Parameters:
delete- The flag showing whether all the contents must be deleted.
-
updateDerivedDataInfo
Description copied from interface:IDerivedDataInfoRepositoryUpdates derived data info according to provided context- Specified by:
updateDerivedDataInfoin interfaceIDerivedDataInfoRepository- Parameters:
context- The provided context, may not benull
-
updateDerivedDataInfo
Description copied from interface:IDerivedDataInfoRepositoryUpdates derived data info according to provided context- Specified by:
updateDerivedDataInfoin interfaceIDerivedDataInfoRepository- Parameters:
context- The provided context, may not benullversion- The context creation timestamp
-
loadExistingContext
public IObjectDerivedDataContext loadExistingContext(Object objectId, String segmentId, DerivedDataInfo.SegmentContextData segmentData, IObjectContextFactory objectContextFactory) Description copied from interface:IDerivedDataInfoRepositoryLoads an existing context with a data being stored in the repository- Specified by:
loadExistingContextin interfaceIDerivedDataInfoRepository- Parameters:
objectId- A target object identifier. May not benullsegmentId- A target object identifier. May not benullsegmentData- A custom data of a context. May not benullobjectContextFactory- The object context creation factory. May not benull- Returns:
- Loaded async. computation context. Can be
nullin case if context doesn't exist
-
deactivateContexts
Description copied from interface:IDerivedDataInfoRepositoryPerform mass deactivation of contexts- Specified by:
deactivateContextsin interfaceIDerivedDataInfoRepository- Parameters:
segmentId- Target segment of async. processing pipeline for the deactivationobjectContextFactory- The object context creation factory. May not benull
-