CanLockBMOD: Boolean;
CanLockBMOD: Boolean;
The CanLockBMOD property determines a mode of locking the system table during loading factors to the time series database.
The property is set to True by default, the system table is locked during the loading. This locking enables the user to avoid parallel recording to the time series database, to which the loading is executed. If during this some copying is started, it will be queued.
If the CanLockBMOD property is set to False during the loading of factors, the table will not be locked. The analysis of running parallel operations with the time series database is the responsibility of the application developer.
IMPORTANT. Parallel running of multiple loadings with disabled locking of the system table may lead to hanging of running processes.
The value of this property is not saved, it can be changed only on working with the object of loading from Fore. To specify the property, cast the result of factors import (the IImportRequestInstance.ImportResult property) to the IImportRequestProviderParams interface and specify the required value.
Executing the example requires that the repository contains a time series database with the FC_FROM identifier. The import object with the OBJ_IMPORT identifier is created in the database.
Sub UserProc;
Var
Mb: IMetabase;
RubrDescr: IMetabaseObjectDescriptor;
ImportRequestInst: IImportRequestInstance;
Begin
Mb := MetabaseClass.Active;
RubrDescr := Mb.ItemById("FC_AUTO");
ImportRequestInst := Mb.ItemByIdNamespace("OBJ_IMPORT", RubrDescr.Key).Open(Null) As IImportRequestInstance;
//Unlock system table
(ImportRequestInst.ImportResult As IImportRequestProviderParams).CanLockBMOD := False;
//...
//Set up other loading parameters
//...
ImportRequestInst.LoadData;
End Sub UserProc;
On executing the example the process of loading factors to the time series database is started. The system table locking allowing to trace on the system level the processes of working with the time series database will be disabled. Before finishing the current loading the process of tracing the startup of other works with the database must be executed in the application code.
Executing the example requires that the repository contains a time series database with the FC_FROM identifier. The import object with the OBJ_IMPORT identifier is created in the database.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
RubrDescr: IMetabaseObjectDescriptor;
ImportRequestInst: IImportRequestInstance;
Begin
Mb := Params.Metabase;
RubrDescr := Mb.ItemById["FC_AUTO"];
ImportRequestInst := Mb.ItemByIdNamespace["OBJ_IMPORT", RubrDescr.Key].Open(Null) As IImportRequestInstance;
//Unlock system table
(ImportRequestInst.ImportResult As IImportRequestProviderParams).CanLockBMOD := False;
//...
//Set up other loading parameters
//...
ImportRequestInst.LoadData();
End Sub;
On executing the example loading of factors to the time series database is started. The system table locking allowing to trace on the system level the processes of working with the time series database will be disabled. Before finishing the current loading the process of tracing the startup of other works with the database must be executed in the application code.
See also: