/**
* The interval at which a heart beat message will be sent to the remote
* RaftActor.
- * <p/>
+ *
+ * <p>
* Since this is set to 100 milliseconds the Election timeout should be
* at least 200 milliseconds
*/
private PeerAddressResolver peerAddressResolver = NoopPeerAddressResolver.INSTANCE;
+ private String tempFileDirectory = "";
+
+ private int fileBackedStreamingThreshold = 128 * MEGABYTE;
+
public void setHeartBeatInterval(FiniteDuration heartBeatInterval) {
this.heartBeatInterval = heartBeatInterval;
electionTimeOutInterval = null;
electionTimeOutInterval = null;
}
+ public void setTempFileDirectory(String tempFileDirectory) {
+ this.tempFileDirectory = tempFileDirectory;
+ }
+
+ public void setFileBackedStreamingThreshold(int fileBackedStreamingThreshold) {
+ this.fileBackedStreamingThreshold = fileBackedStreamingThreshold;
+ }
+
public void setCustomRaftPolicyImplementationClass(String customRaftPolicyImplementationClass) {
this.customRaftPolicyImplementationClass = customRaftPolicyImplementationClass;
}
return policySupplier.get();
}
+ @Override
+ public String getTempFileDirectory() {
+ return tempFileDirectory;
+ }
+
+ @Override
+ public int getFileBackedStreamingThreshold() {
+ return fileBackedStreamingThreshold;
+ }
+
private class PolicySupplier implements Supplier<RaftPolicy> {
@Override
@SuppressWarnings("checkstyle:IllegalCatch")