Package com.kolich.havalo.exceptions.repositories

Examples of com.kolich.havalo.exceptions.repositories.RepositoryDeletionException


          repo.deleteAllObjects();
          // Get a handle to the repository directory and recursively
          // delete it and everything inside of it.
          final File repoFile = repo.getFile();
          if(!deleteQuietly(repoFile)) {
            throw new RepositoryDeletionException("Failed to " +
              "recursively delete repository (repo=" +
                repo.getRepoId() + ", file=" +
                  repoFile.getCanonicalPath() + ")");
          }
          // Delete the meta data associated with the repository too.
          metaStore_.delete(repo.getKey());
          return null;
        }
        @Override
        public void success(final Void v) throws Exception {
          // On deletion success, remove the repository from the
          // local in-memory "cache".  If the repository was not
          // deleted successfully, then fail.
          repositories_.invalidate(repo.getRepoId());
        }
      }.write(); // Exclusive lock on repo, no wait
    } catch (LockConflictException e) {
      throw e;
    } catch (RepositoryDeletionException e) {
      throw e;
    } catch (Exception e) {
      throw new RepositoryDeletionException("Failed to delete " +
        "repository (repo=" + repo.getKey() + ")", e);
    }
  }
View Full Code Here

TOP

Related Classes of com.kolich.havalo.exceptions.repositories.RepositoryDeletionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.