@Test public void isInTier() { mInfo.addWorker(1, "HDD"); assertTrue(mInfo.isInTier("HDD")); }
public boolean isInTier(String targetTierAlias) { for (String tierAlias : mWorkerIdToAlias.values()) { if (tierAlias.equals(targetTierAlias)) { return true; } } return false; }
MasterBlockInfo { public boolean isInTier(String targetTierAlias) { for (String tierAlias : mWorkerIdToAlias.values()) { if (tierAlias.equals(targetTierAlias)) { return true; } } return false; } }
MasterBlockInfo { public boolean isInTier(String targetTierAlias) { for (String tierAlias : mWorkerIdToAlias.values()) { if (tierAlias.equals(targetTierAlias)) { return true; } } return false; } MasterBlockInfo(long blockId, long length); }
MasterBlockInfo { public boolean isInTier(String targetTierAlias) { for (String tierAlias : mWorkerIdToAlias.values()) { if (tierAlias.equals(targetTierAlias)) { return true; } } return false; } MasterBlockInfo(long blockId, long length); long getLength(); synchronized void updateLength(long length); long getBlockId(); void addWorker(long workerId, String tierAlias); void removeWorker(long workerId); Set<Long> getWorkers(); int getNumLocations(); List<MasterBlockLocation> getBlockLocations(); boolean isInTier(String targetTierAlias); @Override String toString(); }
MasterBlockInfo { public boolean isInTier(String targetTierAlias) { for (String tierAlias : mWorkerIdToAlias.values()) { if (tierAlias.equals(targetTierAlias)) { return true; } } return false; } MasterBlockInfo(long blockId, long length); long getLength(); synchronized void updateLength(long length); long getBlockId(); void addWorker(long workerId, String tierAlias); void removeWorker(long workerId); Set<Long> getWorkers(); int getNumLocations(); List<MasterBlockLocation> getBlockLocations(); boolean isInTier(String targetTierAlias); @Override String toString();  }