public List<PhysicalMachine> getAllPm() { List<PhysicalMachine> pml = new ArrayList<PhysicalMachine>(); for (Entry<String, ClusterComponent> e : map.subMap(PathUtil.PM_PATH_S, true, PathUtil.PM_PATH_E, true).entrySet()) { pml.add((PhysicalMachine) e.getValue()); } return pml; }
public List<Cluster> getAllCluster() { List<Cluster> cl = new ArrayList<Cluster>(); for (Entry<String, ClusterComponent> e : map.subMap(PathUtil.CLUSTER_PATH_S, true, PathUtil.CLUSTER_PATH_E, true).entrySet()) { cl.add((Cluster) e.getValue()); } return cl; }
public List<Gateway> getGwList(String clusterName) { List<Gateway> gwl = new ArrayList<Gateway>(); for (Entry<String, ClusterComponent> e : map.subMap(PathUtil.GW_PATH_S(clusterName), true, PathUtil.GW_PATH_E(clusterName), true) .entrySet()) { gwl.add((Gateway) e.getValue()); } return gwl; }
public List<PhysicalMachineCluster> getPmcList(String pmName) { List<PhysicalMachineCluster> pmcl = new ArrayList<PhysicalMachineCluster>(); for (Entry<String, ClusterComponent> e : map.subMap(PathUtil.PMC_PATH_S(pmName), true, PathUtil.PMC_PATH_E(pmName), true) .entrySet()) { pmcl.add((PhysicalMachineCluster) e.getValue()); } return pmcl; }
public List<RedisServer> getRsList(String clusterName) { List<RedisServer> rsl = new ArrayList<RedisServer>(); for (Entry<String, ClusterComponent> e : map.subMap(PathUtil.RS_PATH_S(clusterName), true, PathUtil.RS_PATH_E(clusterName), true) .entrySet()) { rsl.add((RedisServer) e.getValue()); } return rsl; }
public List<PartitionGroupServer> getPgsList(String clusterName) { List<PartitionGroupServer> pgsl = new ArrayList<PartitionGroupServer>(); for (Entry<String, ClusterComponent> e : map.subMap(PathUtil.PGS_PATH_S(clusterName), true, PathUtil.PGS_PATH_E(clusterName), true) .entrySet()) { pgsl.add((PartitionGroupServer) e.getValue()); } return pgsl; }
public void open(Serializable e) throws Exception { Properties jobParameters = BatchRuntime.getJobOperator().getParameters(jobContext.getExecutionId()); ConcurrentSkipListMap<Integer, PayrollInputRecord> records = dataBean.getPayrollInputRecords((String) jobParameters.get("monthYear")); Integer fromKey = (Integer) jobParameters.get("startEmpID"); Integer toKey = (Integer) jobParameters.get("endEmpID"); payrollInputRecords = records.subMap(fromKey, true, toKey, false).values().iterator(); }
public List<RedisServer> getRsList(String clusterName, String pgName) { final int pgId = Integer.valueOf(pgName); List<RedisServer> rsl = new ArrayList<RedisServer>(); for (Entry<String, ClusterComponent> e : map.subMap(PathUtil.RS_PATH_S(clusterName), true, PathUtil.RS_PATH_E(clusterName), true) .entrySet()) { RedisServer rs = (RedisServer) e.getValue(); if (rs.getPgId() == pgId) { rsl.add(rs); } } return rsl; }
public List<PartitionGroupServer> getPgsList(String clusterName, String pgName) { final int pgId = Integer.valueOf(pgName); List<PartitionGroupServer> pgsl = new ArrayList<PartitionGroupServer>(); for (Entry<String, ClusterComponent> e : map.subMap(PathUtil.PGS_PATH_S(clusterName), true, PathUtil.PGS_PATH_E(clusterName), true) .entrySet()) { PartitionGroupServer pgs = (PartitionGroupServer) e.getValue(); if (pgs.getPgId() == pgId) { pgsl.add(pgs); } } return pgsl; }
/** Create a map from Integers 1-5 to Strings "A"-"E". */ private static ConcurrentNavigableMap map5() { ConcurrentSkipListMap map = new ConcurrentSkipListMap(); assertTrue(map.isEmpty()); map.put(zero, "Z"); map.put(one, "A"); map.put(five, "E"); map.put(three, "C"); map.put(two, "B"); map.put(four, "D"); map.put(seven, "F"); assertFalse(map.isEmpty()); assertEquals(7, map.size()); return map.subMap(one, true, seven, false); }