@Test public void testCmRaftConfiguration() { Configuration conf = CmRaftConfiguration.create(); conf.set("aaa", "123a"); conf.set("aaa", "123"); for(String key: conf.getKeys()) { System.out.println(key +": " + conf.getString(key)); } System.out.println("**************"); for(String key: conf.getKeys("raft.server")) { System.out.println(key +": " + conf.getString(key)); } }
public CmRaftConfiguration() throws ConfigurationException { conf = new PropertiesConfiguration("cmraft.properties"); }
CmRaftConfiguration implements Configuration { public CmRaftConfiguration() throws ConfigurationException { conf = new PropertiesConfiguration("cmraft.properties"); } }
CmRaftConfiguration implements Configuration { public CmRaftConfiguration() throws ConfigurationException { conf = new PropertiesConfiguration("cmraft.properties"); } CmRaftConfiguration(); }
CmRaftConfiguration implements Configuration { public CmRaftConfiguration() throws ConfigurationException { conf = new PropertiesConfiguration("cmraft.properties"); } CmRaftConfiguration(); static Configuration create(); @Override void useResource(String resourceName); @Override Object clone(); @Override String toString(); @Override String getString(String key); @Override String getString(String key, String defaultValue); @Override int getInt(String key); @Override int getInt(String key, int defaultValue); @Override Iterable<String> getKeys(); @Override Iterable<String> getKeys(String prefix); @Override void set(String key, String value); @Override void clear(); @Override void remove(String key); }
CmRaftConfiguration implements Configuration { public CmRaftConfiguration() throws ConfigurationException { conf = new PropertiesConfiguration("cmraft.properties"); } CmRaftConfiguration(); static Configuration create(); @Override void useResource(String resourceName); @Override Object clone(); @Override String toString(); @Override String getString(String key); @Override String getString(String key, String defaultValue); @Override int getInt(String key); @Override int getInt(String key, int defaultValue); @Override Iterable<String> getKeys(); @Override Iterable<String> getKeys(String prefix); @Override void set(String key, String value); @Override void clear(); @Override void remove(String key);  }