code: Long[] findTaskIds(long partition, TaskState state, boolean inState, Long minId, Integer maxResults) throws Exception {
          Long[] results = null;
          TransactionController tranController = new TransactionController();
          try {
              tranController.preInvoke();
              List<Long> ids = taskStore.findTaskIds(null, null, state, inState, minId, maxResults, null, partition);
              results = ids.toArray(new Long[ids.size()]);
          } catch (Throwable x) {
              tranController.setFailure(x);
          } finally {
              Exception x = tranController.postInvoke(Exception.class);
              if (x != null)
                  throw x;
          }
  
          return results;
      }
docs: Find all task IDs for tasks that match the specified partition id and the presence or absence
  (as determined by the inState attribute) of the specified state.
  For example, to find taskIDs for the first 100 tasks in partition 12 that have not completed all executions,
  taskStore.findTaskIds(12, TaskState.ENDED, false, null, 100);
  
  This method is for the mbean only.
  
  @param partition identifier of the partition in which to search for tasks.
  @param state a task state. For example, TaskState.SCHEDULED
  @param inState indicates whether to include or exclude results with the specified state
  @param minId minimum value for task id to be returned in the results. A null value means no minimum.
  @param maxResults limits the number of results to return to the specified maximum value. A null value means no limit.
  @return in-memory, ordered list of task ID.
  @throws Exception if an error occurs when attempting to access the persistent task store.