public synchronized List<MonitoredTask> getTasks(String filter) {
    purgeExpiredTasks();
    TaskFilter taskFilter = createTaskFilter(filter);
    ArrayList<MonitoredTask> results =
      Lists.newArrayListWithCapacity(tasks.size() + rpcTasks.size());
    processTasks(tasks, taskFilter, results);
    processTasks(rpcTasks, taskFilter, results);
    return results;
  }
Produces a list containing copies of the current state of all non-expired MonitoredTasks
handled by this TaskMonitor.
@param filter type of wanted tasks
@return A filtered list of MonitoredTasks.
hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java