Package org.globus.workspace

Examples of org.globus.workspace.WorkspaceException


            if (file.canWrite()) {
                if (this.lager.accounting) {
                    logger.debug("can write to " + file.getAbsolutePath());
                }
            } else {
                throw new WorkspaceException("can not write to " +
                        name + ": '" + file.getAbsolutePath() + "'");
            }

            if (setFilePermissions(file.getAbsolutePath(), 600)) {
                if (this.lager.accounting) {
                    logger.debug("able to set owner only: " +
                            file.getAbsolutePath());
                }
            } else {
                throw new WorkspaceException("can not set " +
                    name + " permissions to owner-only: '" +
                        file.getAbsolutePath() + "'");
            }

        } catch (IOException e) {
            throw new WorkspaceException(name + " ('" +
                    file.getAbsolutePath() + "') is not set up properly:", e);
        }
    }
View Full Code Here


            this.create(uuid, id, ownerDN, minutesRequested, charge,
                        now, CPUCount, memory, chargeRatio, moreToLog);
            this.schedule();
        } catch (Throwable t) {
            logger.error(t.getMessage(), t);
            throw new WorkspaceException(t.getMessage());
        }
    }
View Full Code Here

        try {
            this.remove(uuid, id, ownerDN, charge, now);
            this.schedule();
        } catch (Throwable t) {
            logger.error(t.getMessage(), t);
            throw new WorkspaceException(t.getMessage());
        }
    }
View Full Code Here

            if (lager.accounting) {
                logger.trace("evEnabled: write");
            }

            if (this.eventLogFile == null) {
                throw new WorkspaceException("eventLogFile null but" +
                        " evEnabled is true");
            }

            if (this.unwrittenEvents.isEmpty()) {
                if (lager.accounting) {
                    logger.trace("unwrittenEvents is empty");
                }
            } else {
                append(this.eventLogFile, this.unwrittenEvents);
                this.unwrittenEvents.clear();
                logger.debug("wrote to " + this.eventLogPath);
            }
        }

        if (this.resEnabled) {

            if (lager.accounting) {
                logger.trace("resEnabled: write");
            }

            if (this.curresFile == null) {
                throw new WorkspaceException("curresFile null but" +
                        " resEnabled is true");
            }

            final ArrayList reservations = this.db.allActiveReservations();
            replace(this.curresFile, reservations);
View Full Code Here

        if (vm != null) {
            final ArrayList exe =
                    XenUtil.constructCreateCommand(vm, true);
            this.cmd = (String[]) exe.toArray(new String[exe.size()]);
        } else {
            throw new WorkspaceException("no VirtualMachine in request " +
                    "context, can not " + this.name);
        }
    }
View Full Code Here

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
            final ArrayList exe = XenUtil.constructUnpauseCommand(vm);
            this.cmd = (String[]) exe.toArray(new String[exe.size()]);
        } else {
            throw new WorkspaceException("no VirtualMachine in request " +
                    "context, can not " + this.name);
        }
    }
View Full Code Here

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
            final ArrayList exe = XenUtil.constructRebootCommand(vm);
            this.cmd = (String[]) exe.toArray(new String[exe.size()]);
        } else {
            throw new WorkspaceException("no VirtualMachine in request " +
                    "context, can not " + this.name);
        }
    }
View Full Code Here

                            constructUnpropagateCommand(vm);

            this.cmd = (String[]) exe.toArray(new String[exe.size()]);

        } else {
            throw new WorkspaceException("no VirtualMachine in request " +
                    "context, can not " + this.name);
        }
    }
View Full Code Here

        final VirtualMachine vm = this.ctx.getVm();
        if (vm != null) {
            final ArrayList exe = XenUtil.constructPauseCommand(vm);
            this.cmd = (String[]) exe.toArray(new String[exe.size()]);
        } else {
            throw new WorkspaceException("no VirtualMachine in request " +
                    "context, can not " + this.name);
        }
    }
View Full Code Here

        if (vm != null) {
            final ArrayList exe =
                XenUtil.constructRemoveCommand(vm, true);
            this.cmd = (String[]) exe.toArray(new String[exe.size()]);
        } else {
            throw new WorkspaceException("no VirtualMachine in request " +
                    "context, can not " + this.name);
        }
    }
View Full Code Here

TOP

Related Classes of org.globus.workspace.WorkspaceException

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.