@Test public void createChannelConf_2() throws IOException { DimitPath path = zkStore.createChannelConf("voice", "vcode", "21002", "ch2", ChannelStatus.PRIMARY, 8, 100f, Arrays.asList(DemoConst.TAG_FIXED)); DimitConf dimitConf = path.<DimitConf> toStore(DimitConf.class); LOG.info("read dimit {} {}", path, dimitConf); }
public DimitPath createChannelConf(String did, String gid, String id, String name, ChannelStatus status, int priority, float tps, List<String> tags) throws IOException { long ct = System.currentTimeMillis(); ChannelConf storeConf = ChannelConf.newBuilder().setCt(ct).setGid(gid).setId(id).setMt(ct).setName(name).setPriority(priority) .setStatus(status).setTps(tps).setV(Const.V).addAllTag(tags).build(); DimitPath path = confPath.newPath(did).newPath(gid).newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create ChannelConf {} {} {}", id, name, path); return path; }
ZkStoreConfDemo implements Closeable { public DimitPath createChannelConf(String did, String gid, String id, String name, ChannelStatus status, int priority, float tps, List<String> tags) throws IOException { long ct = System.currentTimeMillis(); ChannelConf storeConf = ChannelConf.newBuilder().setCt(ct).setGid(gid).setId(id).setMt(ct).setName(name).setPriority(priority) .setStatus(status).setTps(tps).setV(Const.V).addAllTag(tags).build(); DimitPath path = confPath.newPath(did).newPath(gid).newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create ChannelConf {} {} {}", id, name, path); return path; } }
ZkStoreConfDemo implements Closeable { public DimitPath createChannelConf(String did, String gid, String id, String name, ChannelStatus status, int priority, float tps, List<String> tags) throws IOException { long ct = System.currentTimeMillis(); ChannelConf storeConf = ChannelConf.newBuilder().setCt(ct).setGid(gid).setId(id).setMt(ct).setName(name).setPriority(priority) .setStatus(status).setTps(tps).setV(Const.V).addAllTag(tags).build(); DimitPath path = confPath.newPath(did).newPath(gid).newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create ChannelConf {} {} {}", id, name, path); return path; } ZkStoreConfDemo(String uri); }
ZkStoreConfDemo implements Closeable { public DimitPath createChannelConf(String did, String gid, String id, String name, ChannelStatus status, int priority, float tps, List<String> tags) throws IOException { long ct = System.currentTimeMillis(); ChannelConf storeConf = ChannelConf.newBuilder().setCt(ct).setGid(gid).setId(id).setMt(ct).setName(name).setPriority(priority) .setStatus(status).setTps(tps).setV(Const.V).addAllTag(tags).build(); DimitPath path = confPath.newPath(did).newPath(gid).newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create ChannelConf {} {} {}", 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 createChannelConf(String did, String gid, String id, String name, ChannelStatus status, int priority, float tps, List<String> tags) throws IOException { long ct = System.currentTimeMillis(); ChannelConf storeConf = ChannelConf.newBuilder().setCt(ct).setGid(gid).setId(id).setMt(ct).setName(name).setPriority(priority) .setStatus(status).setTps(tps).setV(Const.V).addAllTag(tags).build(); DimitPath path = confPath.newPath(did).newPath(gid).newPath(id); path = dss.io().write(path, storeConf, StoreAttribute.PERSISTENT); LOG.info("create ChannelConf {} {} {}", 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();  }