@Test public void createDimitConf() throws IOException { DimitPath path = zkStore.createDimitConf("voice", "语音流控"); DimitConf dimitConf = path.<DimitConf> toStore(DimitConf.class); LOG.info("read dimit {} {}", path, dimitConf); }
public DimitPath createDimitConf(String id, String name) throws IOException { long ct = System.currentTimeMillis(); DimitConf storeConf = DimitConf.newBuilder().setCt(ct).setId(id).setMt(ct).setName(name).setV(Const.V).build(); DimitPath path = confPath.newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create DimitConf {} {} {}", id, name, path); return path; }
ZkStoreConfDemo implements Closeable { public DimitPath createDimitConf(String id, String name) throws IOException { long ct = System.currentTimeMillis(); DimitConf storeConf = DimitConf.newBuilder().setCt(ct).setId(id).setMt(ct).setName(name).setV(Const.V).build(); DimitPath path = confPath.newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create DimitConf {} {} {}", id, name, path); return path; } }
ZkStoreConfDemo implements Closeable { public DimitPath createDimitConf(String id, String name) throws IOException { long ct = System.currentTimeMillis(); DimitConf storeConf = DimitConf.newBuilder().setCt(ct).setId(id).setMt(ct).setName(name).setV(Const.V).build(); DimitPath path = confPath.newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create DimitConf {} {} {}", id, name, path); return path; } ZkStoreConfDemo(String uri); }
ZkStoreConfDemo implements Closeable { public DimitPath createDimitConf(String id, String name) throws IOException { long ct = System.currentTimeMillis(); DimitConf storeConf = DimitConf.newBuilder().setCt(ct).setId(id).setMt(ct).setName(name).setV(Const.V).build(); DimitPath path = confPath.newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create DimitConf {} {} {}", id, name, path); return path; } ZkStoreConfDemo(String uri); DimitStoreSystem storeSystem(); DimitPath createDimitConf(String id, String name); DimitPath createChannelGroupConf(String did, String id, String name); DimitPath createChannelConf(String did, String gid, String id, String name, ChannelStatus status, int priority, float tps,
            List<String> tags); void removeDimitConf(String id); @Override void close(); }
ZkStoreConfDemo implements Closeable { public DimitPath createDimitConf(String id, String name) throws IOException { long ct = System.currentTimeMillis(); DimitConf storeConf = DimitConf.newBuilder().setCt(ct).setId(id).setMt(ct).setName(name).setV(Const.V).build(); DimitPath path = confPath.newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create DimitConf {} {} {}", id, name, path); return path; } ZkStoreConfDemo(String uri); DimitStoreSystem storeSystem(); DimitPath createDimitConf(String id, String name); DimitPath createChannelGroupConf(String did, String id, String name); DimitPath createChannelConf(String did, String gid, String id, String name, ChannelStatus status, int priority, float tps,
            List<String> tags); void removeDimitConf(String id); @Override void close();  }