replicationmasterstorageimpl.java
来自「这个是perst-269.zip下面的SOURCECODE,和大家分享了。」· Java 代码 · 共 29 行
JAVA
29 行
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 + =
减小字号Ctrl + -
显示快捷键?