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