CanLockBMOD: Boolean;
CanLockBMOD: Boolean;
The CanLockBMOD property determines the mode of locking the system table on copying.
The property is set to True by default; during copying the system table is locked. It enables the user to avoid parallel recording to the time series database, to which the copying is executed. If during this some copying of time series databases are started, they are queued.
If the CanLockBMOD property is set to False during the copying of factors, the system table will not be locked. The analysis of starting parallel copying is the responsibility of the application developer.
IMPORTANT. Parallel startup of some copying on disabled lock of the system table may lead to hanging of processes.
The value of this property is not saved with the copying object, it can be changed only on working with the copying object from Fore.
Executing the example requires that the repository contains two time series databases: FC_FROM and FC_FROM_COPY.
Sub UserProc;
Var
Mb: IMetabase;
Update: ICubeMetaUpdateEx;
Begin
Mb := MetabaseClass.Active;
Update := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
Update.Metabase := Mb;
Update.Rubricator := Mb.ItemById("FC_FROM").Bind As IRubricator;
Update.TargetRubricator := Mb.ItemById("FC_FROM_COPY").Bind As IRubricator;
//...
//Set up copying object
//...
//Unlock system table
Update.CanLockBMOD := False;
//Launch copying
Update.Apply(Null);
End Sub UserProc;
On executing the example the process of copying to the existing time series database will be started. The system table allowing to trace on the system level the processes of starting copying will be unlocked. Before finishing the copying process, tracing the startup of other copying launches must be executed in the application code.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Metabase;
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
Update: ICubeMetaUpdateEx = New CubeMetaUpdateClassClass();
Begin
Mb := Params.Metabase;
Update.Metabase := Mb;
Update.Rubricator := Mb.ItemById["FC_FROM"].Bind() As IRubricator;
Update.TargetRubricator := Mb.ItemById["FC_FROM_COPY"].Bind() As IRubricator;
//...
//Set up copying object
//...
//Unlock system table
Update.CanLockBMOD := False;
//Launch copying
Update.Apply(Null);
End Sub;
See also: