📄 cwp4367.htm
字号:
<!-- saved from url=(0007)http:// -->
<HTML><HEAD><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><TITLE>Perst.StorageFactory.CreateReplicationMasterStorage</TITLE><LINK REL=STYLESHEET HREF="../CommentReport.css" TYPE="text/css"></HEAD><BODY topmargin=0 rightmargin=0 leftmargin=0 style="background-image: url(../titletile.jpg); background-repeat:repeat-x; background-position: 0 0;" ><DIV CLASS="PageHeading">Perst.StorageFactory.CreateReplicationMasterStorage Function</DIV><DIV CLASS="Description">
Create new instance of the master node of replicated storage. There are two kinds of replication slave nodes:
statically defined and dynamically added. First one are specified by replicationSlaveNodes parameter.
When replication master is started it tries to eastablish connection with all of the specified nodes.
It is expected that state of each such node is synchronized with state of the master node.
It is not possible to add or remove static replication slave node without stopping master node.
Dynamic slave nodes can be added at any moment of time. Replication master will send to such node complete
snapshot of the database.
<P></DIV><IMG src="../GradLeft.jpg" width=7 height=378 alt="" border="0" style="position:absolute; left:10; top:18;z-Index:2"><IMG src="../GradTop.jpg" width=352 height=7 alt="" border="0" align="top" style="position:absolute; left:10; top:18; z-index:1"><DIV CLASS="Remarks"><SPAN CLASS="RemarkHdrX">Public Perst.ReplicationMasterStorage CreateReplicationMasterStorage (int, string[], int)</SPAN></DIV><TABLE CLASS="InfoTable" cellpadding=0 cellspacing=0><TR height=20><TD width=20> </TD><TD valign=top align=left width=9 bgcolor="#cccc66"><IMG SRC="../graycorner.jpg" align=top></TD><TD CLASS="TableLightLabel" >Type</TD><TD CLASS="TableLightLabel" >Name</TD><TD CLASS="TableLightLabel" >Description</TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc">int</TD><TD CLASS="TableLightDesc">port</TD><TD CLASS="TableLightDesc">socket port at which replication master will listen for dynamic slave nodes connections.
If this parameter is -1, then no dynamic slave node conenctions are accepted.</TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc">string</TD><TD CLASS="TableLightDesc">replicationSlaveNodes</TD><TD CLASS="TableLightDesc">addresses of hosts to which replication will be performed.
Address as specified as NAME:PORT</TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc">int</TD><TD CLASS="TableLightDesc">asyncBufSize</TD><TD CLASS="TableLightDesc">if value of this parameter is greater than zero then replication will be
asynchronous, done by separate thread and not blocking main application.
Otherwise data is send to the slave nodes by the same thread which updates the database.
If space asynchronous buffer is exhausted, then main thread willbe also blocked until the
data is send.</TD><TD width=20> </TD></TR></TABLE><TABLE CLASS="InfoTable" cellpadding=0 cellspacing=0><TR height=20><TD width=20> </TD><TD valign=top align=left width=9 bgcolor="#cccc66"><IMG SRC="../graycorner.jpg" align=top></TD><TD CLASS="TableLightLabel" WIDTH=206>Return</TD><TD CLASS="TableLightLabel" >Description</TD><TD width=20> </TD></TR><TR height=20><TD width=20> </TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"><A HREF="CWP4368.HTM">ReplicationMasterStorage</A></TD><TD CLASS="TableLightDesc"> </TD><TD CLASS="TableLightDesc"> </TD><TD width=20> </TD></TR></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -