📄 replicationmasterstorageimpl.java
字号:
package org.garret.perst.impl;
import org.garret.perst.*;
public class ReplicationMasterStorageImpl extends StorageImpl implements ReplicationMasterStorage
{
public ReplicationMasterStorageImpl(int port, String[] hosts, int asyncBufSize) {
this.port = port;
this.hosts = hosts;
this.asyncBufSize = asyncBufSize;
}
public void open(IFile file, int pagePoolSize) {
super.open(asyncBufSize != 0
? (ReplicationMasterFile)new AsyncReplicationMasterFile(this, file, asyncBufSize)
: new ReplicationMasterFile(this, file),
pagePoolSize);
}
public int getNumberOfAvailableHosts() {
return ((ReplicationMasterFile)pool.file).getNumberOfAvailableHosts();
}
int port;
String[] hosts;
int asyncBufSize;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -