📄 replicationmasterstorageimpl.cs
字号:
namespace Perst.Impl
{
using Perst;
public class ReplicationMasterStorageImpl : StorageImpl, ReplicationMasterStorage
{
public ReplicationMasterStorageImpl(int port, string[] hosts, int asyncBufSize)
{
this.port = port;
this.hosts = hosts;
this.asyncBufSize = asyncBufSize;
}
public override void Open(IFile file, int pagePoolSize)
{
base.Open(asyncBufSize != 0
? (ReplicationMasterFile)new AsyncReplicationMasterFile(this, file, asyncBufSize)
: new ReplicationMasterFile(this, file),
pagePoolSize);
}
public int GetNumberOfAvailableHosts()
{
return ((ReplicationMasterFile)pool.file).GetNumberOfAvailableHosts();
}
internal string[] hosts;
internal int port;
internal int asyncBufSize;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -