public RoutingRule(String routeKey, Map<String, Object> propMap) { super(propMap); this.routeRangesStr = (String) propMap.get("routeRanges"); String[] rangesArr = this.routeRangesStr.split(","); if (rangesArr != null && rangesArr.length > 0) { this.routeRanges = new ArrayList<>(); for (String r : rangesArr) { routeRanges.add(DocRouter.DEFAULT.fromString(r)); } } else { this.routeRanges = null; } this.targetCollectionName = (String) propMap.get("targetCollection"); this.expireAt = Long.parseLong((String) propMap.get("expireAt")); }
public RoutingRule(String routeKey, Map<String, Object> propMap) { super(propMap); this.routeRangesStr = (String) propMap.get("routeRanges"); String[] rangesArr = this.routeRangesStr.split(","); if (rangesArr != null && rangesArr.length > 0) { this.routeRanges = new ArrayList<>(); for (String r : rangesArr) { routeRanges.add(DocRouter.DEFAULT.fromString(r)); } } else { this.routeRanges = null; } this.targetCollectionName = (String) propMap.get("targetCollection"); this.expireAt = Long.parseLong((String) propMap.get("expireAt")); }
} else if (rangeObj != null) { tmpRange = DocRouter.DEFAULT.fromString(rangeObj.toString());
} else if (rangeObj != null) { tmpRange = DocRouter.DEFAULT.fromString(rangeObj.toString());