Beispiel #1
0
  /**
   * remove replicas.
   *
   * @param guid file's GUID
   * @throws Exception
   */
  public synchronized void removeReplicas(String guid) throws Exception {
    VAFileDao fileDao = DaoFactory.getVAFileDao();

    List<VAObject> replicas = fileDao.getReplicas(guid);
    for (VAObject replica : replicas) {
      removeFile(null, null, replica.getGuid());
    }
  }
Beispiel #2
0
  /**
   * get the files whose state is not ready.
   *
   * @return file list
   * @throws Exception
   */
  public List<VAFile> getProcessingFiles() throws Exception {
    // get file data access object
    VAFileDao fileDao = DaoFactory.getVAFileDao();

    List<VAFile> result = new ArrayList<VAFile>();
    List<VAObject> list = fileDao.getNotReadyFiles();
    for (VAObject obj : list) {
      if (obj.getState() == VAMConstants.STATE_PROCESSING) {
        result.add(new VAFile(obj));
      }
    }

    return result;
  }