/** @return the ids of the children */ public synchronized Set<Long> getChildrenIds() { Set<Long> ret = new HashSet<Long>(mChildren.size()); for (Inode child : mChildren) { ret.add(child.getId()); } return ret; }
/** * Gets info about the lost workers. * * @return a set of worker info */ public Set<WorkerInfo> getLostWorkersInfo() { synchronized (mWorkers) { Set<WorkerInfo> ret = new HashSet<WorkerInfo>(mLostWorkers.size()); for (MasterWorkerInfo worker : mLostWorkers) { ret.add(worker.generateClientWorkerInfo()); } return ret; } }
/** @return a list of {@link WorkerInfo} objects representing the workers in Tachyon */ public List<WorkerInfo> getWorkerInfoList() { synchronized (mWorkers) { List<WorkerInfo> workerInfoList = new ArrayList<WorkerInfo>(mWorkers.size()); for (MasterWorkerInfo masterWorkerInfo : mWorkers) { workerInfoList.add(masterWorkerInfo.generateClientWorkerInfo()); } return workerInfoList; } }
/** @return the number of workers */ public int getWorkerCount() { synchronized (mWorkers) { return mWorkers.size(); } }
/** @return the number of children in the directory */ public synchronized int getNumberOfChildren() { return mChildren.size(); }