Package org.nimbustools.api.services.rm

Examples of org.nimbustools.api.services.rm.ManageException


    public boolean isActiveWorkspaceID(String id) throws ManageException {
        try {
            return this.persistence.isActiveWorkspaceID(this.convertID(id));
        } catch (WorkspaceDatabaseException e) {
            throw new ManageException(e.getMessage(), e);
        }
    }
View Full Code Here


        final int[] keys;
        try {
            keys = this.persistence.findActiveWorkspacesIDs();
        } catch (WorkspaceDatabaseException e) {
            throw new ManageException(e.getMessage(), e);
        }

        if (keys == null || keys.length == 0) {
            return EMPTY_RESOURCE_ARRAY;
        }
View Full Code Here

        // revisions to do anything about it
        final int[] keys;
        try {
            keys = this.persistence.findActiveWorkspacesIDs();
        } catch (WorkspaceDatabaseException e) {
            throw new ManageException(e.getMessage(), e);
        }

        if (keys == null || keys.length == 0) {
            return EMPTY_RESOURCE_ARRAY;
        }
View Full Code Here

            throws ManageException {

        try {
            return this.persistence.findVMsByOwner(callerID);
        } catch (WorkspaceDatabaseException e) {
            throw new ManageException(e.getMessage(), e);
        }
    }
View Full Code Here

        String msg = isValidTargetState(target);
        if (msg != null) {
            msg = Lager.id(this.id) + " " + msg;
            logger.error(msg);
            throw new ManageException(msg);
        }

        if (!force) {
            if (target == this.targetState) {
                if (lager.traceLog) {
View Full Code Here

        final Lock lock = this.lockManager.getLock(idStr);
        try {
            lock.lockInterruptibly();
        } catch (InterruptedException e) {
            throw new ManageException(e.getMessage(), e);
        }

        try {

            resource.setID(idStr);
            resource.setCreatorID(creatorID);
            this.persistence.addEnsemble(resource);

            final Element el = this.cache.get(idStr);
            if (el == null) {
                this.cache.put(new Element(idStr, resource));
            } else {
                throw new ManageException("UUID collision in groups cache, " +
                        "ID '" + idStr + "' already exists (seriously?)");
            }

        } finally {
            lock.unlock();
View Full Code Here

    public CoschedResource find(String coschedid)

            throws ManageException, DoesNotExistException {

        if (coschedid == null) {
            throw new ManageException("coschedid may not be null");
        }

        final CoschedResource resource;

        final Lock lock = this.lockManager.getLock(coschedid);
        try {
            lock.lockInterruptibly();
        } catch (InterruptedException e) {
            throw new ManageException(e.getMessage(), e);
        }

        try {

            final Element el = this.cache.get(coschedid);
View Full Code Here

   
    public void destroy(String coschedid) throws ManageException,
                                                 DoesNotExistException {
       
        if (coschedid == null) {
            throw new ManageException("id may not be null");
        }

        final Lock lock = this.lockManager.getLock(coschedid);
        try {
            lock.lockInterruptibly();
        } catch (InterruptedException e) {
            throw new ManageException(e.getMessage(), e);
        }

        try {
            final CoschedResource resource = this.find(coschedid);
            resource.remove();
View Full Code Here

    public void retireEntry(String name, String ipAddress, int trackingID)

            throws ManageException {
       
        if (this.persistence == null) {
            throw new ManageException(
                    "networking initialization problem");
        }

        synchronized(this.lock) {
            Util.retireEntry(name, ipAddress, this.persistence, trackingID);
View Full Code Here

        final Lock lock = this.lockManager.getLock(idStr);
        try {
            lock.lockInterruptibly();
        } catch (InterruptedException e) {
            throw new ManageException(e.getMessage(), e);
        }

        try {

            resource.setID(idStr);
            resource.setCreatorID(creatorID);
            this.persistence.addGroup(resource);

            final Element el = this.cache.get(idStr);
            if (el == null) {
                this.cache.put(new Element(idStr, resource));
            } else {
                throw new ManageException("UUID collision in groups cache, " +
                        "ID '" + idStr + "' already exists (seriously?)");
            }

        } finally {
            lock.unlock();
View Full Code Here

TOP

Related Classes of org.nimbustools.api.services.rm.ManageException

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.