Package org.lilyproject.repository.model.api

Examples of org.lilyproject.repository.model.api.RepositoryNotFoundException


        disallowDefaultRepository(repositoryName);
        RepositoryDefinition repoDef = new RepositoryDefinition(repositoryName, RepositoryLifecycleState.DELETE_REQUESTED);
        try {
            storeRepository(repoDef);
        } catch (KeeperException.NoNodeException e) {
            throw new RepositoryNotFoundException("Can't delete-request repository, a repository with this name doesn't exist: "
                    + repoDef.getName());
        } catch (KeeperException e) {
            throw new RepositoryModelException(e);
        }
    }
View Full Code Here


            throws InterruptedException, RepositoryModelException, RepositoryNotFoundException {
        disallowDefaultRepository(repositoryName);
        try {
            zk.delete(REPOSITORY_COLLECTION_PATH + "/" + repositoryName, -1);
        } catch (KeeperException.NoNodeException e) {
            throw new RepositoryNotFoundException("Can't delete repository, a repository with this name doesn't exist: "
                    + repositoryName);
        } catch (KeeperException e) {
            throw new RepositoryModelException("Error deleting repository.", e);
        }
    }
View Full Code Here

            throws InterruptedException, RepositoryModelException,RepositoryNotFoundException {
        disallowDefaultRepository(repoDef.getName());
        try {
            storeRepository(repoDef);
        } catch (KeeperException.NoNodeException e) {
            throw new RepositoryNotFoundException("Can't update repository, a repository with this name doesn't exist: "
                    + repoDef.getName());
        } catch (KeeperException e) {
            throw new RepositoryModelException(e);
        }
    }
View Full Code Here

    public RepositoryDefinition getRepository(String repositoryName)
            throws InterruptedException, RepositoryModelException, RepositoryNotFoundException {
        try {
            return loadRepository(repositoryName, false);
        } catch (KeeperException.NoNodeException e) {
            throw new RepositoryNotFoundException("No repository named " + repositoryName, e);
        } catch (KeeperException e) {
            throw new RepositoryModelException("Error loading repository " + repositoryName, e);
        }
    }
View Full Code Here

    @Override
    public boolean repositoryActive(String repositoryName) throws RepositoryNotFoundException {
        RepositoryDefinition repoDef = repos.get(repositoryName);
        if (repoDef == null) {
            throw new RepositoryNotFoundException("No repository named " + repositoryName);
        }
        return repoDef.getLifecycleState() == RepositoryLifecycleState.ACTIVE;
    }
View Full Code Here

TOP

Related Classes of org.lilyproject.repository.model.api.RepositoryNotFoundException

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.