Exemplo n.º 1
0
 /** @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;
 }
Exemplo n.º 2
0
 /**
  * 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;
   }
 }
Exemplo n.º 3
0
 /** @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;
   }
 }
Exemplo n.º 4
0
 /** @return the number of workers */
 public int getWorkerCount() {
   synchronized (mWorkers) {
     return mWorkers.size();
   }
 }
Exemplo n.º 5
0
 /** @return the number of children in the directory */
 public synchronized int getNumberOfChildren() {
   return mChildren.size();
 }