raft-java icon indicating copy to clipboard operation
raft-java copied to clipboard

RaftOptions.java missed several methods

Open Limber0117 opened this issue 5 years ago • 1 comments

Hi Wenweihu,

Thanks for your effort. It's really a good and interesting project. However, there are several methods missed in the RaftOptions.java in the com.github.wenweihu86.raft.aftNode.java.

I have added the following methods but it seems still not sufficient. An interesting thing is it seems that those missed methods exist in the corresponding .class file.

public void setDataDir(String dataPath) {
	dataDir = System.getProperty(dataPath);
}

public String getDataDir() {
	return dataDir;
} 

public void setSnapshotMinLogSize(int size){
	snapshotMinLogSize = size;
}
public void setSnapshotPeriodSeconds(int timer){
	snapshotPeriodSeconds = timer;
}
public void setMaxSegmentFileSize(int size){
	maxSegmentFileSize = size;
}

public int getMaxSegmentFileSize() {
	return maxSegmentFileSize;
}

public long getCatchupMargin() {
	return catchupMargin;
}

public int getSnapshotMinLogSize() {
	return snapshotMinLogSize;
}

public int getSnapshotPeriodSeconds() {
	return snapshotPeriodSeconds;
}

public int getRaftConsensusThreadNum() {
	return raftConsensusThreadNum;
}

public boolean isAsyncWrite() {
	return asyncWrite;
}

public int getMaxAwaitTimeout() {
	return maxAwaitTimeout;
}

Limber0117 avatar Jul 11 '20 10:07 Limber0117

Please install Lombok plugin in your IDE.

Tbdgithub avatar Jun 16 '21 06:06 Tbdgithub