CanLockBMOD: Boolean;
CanLockBMOD: Boolean;
The CanLockBMOD property determines a mode of locking the system table on replication.
The property is set to True by default; during loading 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 replications are started, they are queued.
If the CanLockBMOD property is set to False during the replication of factors, the system table will not be locked. The analysis of starting parallel replications is the responsibility of the application developer.
IMPORTANT. Parallel startup of some replications on disabled lock of the system table may lead to hanging of replications.
The value of this property is not saved with the replication object, it can be changed only on working with the replication 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 replication object
//...
//Unlock system table
Update.CanLockBMOD := False;
//Start copying
Update.Apply(Null);
End Sub UserProc;
On executing the example the process of replication tin the existing time series database will be started. The system table allowing to trace on the system level the processes of starting replications will be unlocked. Before finishing the current replication the process of tracing the startup of other replications 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 replication object
//...
//Unlock system table
Update.CanLockBMOD := False;
//Start copying
Update.Apply(Null);
End Sub;
See also: