debug raft

This commit is contained in:
CaiHQ 2022-05-27 17:48:24 +08:00
parent bd6135b6ea
commit 11fb2c3ada

View File

@ -68,7 +68,7 @@ public class ConsistencyPluginManager {
URL[] urls = new URL[consistencyPluginURLs.length];
for (int i = 0; i < consistencyPluginURLs.length; i++) {
try {
if(consistencyPluginURLs[i].endsWith(".jar")) {
if (consistencyPluginURLs[i].endsWith(".jar")) {
urls[i] = new URL("file:" + consistencyPluginURLs[i]);
}
} catch (MalformedURLException e) {
@ -121,7 +121,7 @@ public class ConsistencyPluginManager {
Class<?> clazz = urlClassLoader.loadClass(className);
// ContractExecutorFactory子类 && 非抽象类
if (ContractExecutorFactory.class.isAssignableFrom(clazz) && !Modifier.isAbstract(clazz.getModifiers())) {
ContractExecutorFactory factory = (ContractExecutorFactory)(clazz.newInstance());
ContractExecutorFactory factory = (ContractExecutorFactory) (clazz.newInstance());
factoriesMap.put(factory.getExecutorName(), factory);
}
} catch (Exception e) {
@ -170,6 +170,9 @@ public class ConsistencyPluginManager {
case RequestAllResponseFirst:
name = "RARF";
break;
case RAFT:
name = "RAFT";
break;
}
return createContractExecutor(name, args);
}