use of com.newcosoft.cache.Router in project disgear by yangbutao.
the class ClusterState method collectionFromObjects.
private static CacheCollection collectionFromObjects(String name, Map<String, Object> objs) {
Map<String, Object> props;
Map<String, Shard> slices;
Map<String, Object> sliceObjs = (Map<String, Object>) objs.get(CacheCollection.SHARDS);
if (sliceObjs == null) {
slices = makeShards(objs);
props = Collections.emptyMap();
} else {
slices = makeShards(sliceObjs);
props = new HashMap<String, Object>(objs);
objs.remove(CacheCollection.SHARDS);
}
Router router = Router.DEFAULT;
return new CacheCollection(name, slices, props, router);
}
Aggregations