Package org.globus.workspace.accounting

Examples of org.globus.workspace.accounting.ElapsedAndReservedMinutes


        if (!this.initialized) {
            throw new WorkspaceException("never initialized, " +
                                         "can't do anything");
        }

        final ElapsedAndReservedMinutes elapRes =
                this.db.totalElapsedAndReservedMinutesTuple(ownerDN);

        return elapRes.getElapsed() + elapRes.getReserved();
    }
View Full Code Here


        Connection c = null;
        try {
            c = getConnection();
            long reserved = this.currentReservedMinutesImpl(ownerDN, c);
            long elapsed = totalElapsedMinutesImpl(ownerDN, c);
            return new ElapsedAndReservedMinutes(elapsed, reserved);
        } catch(SQLException e) {
            logger.error("",e);
            throw new WorkspaceException(e);
        } finally {
            if (c != null) {
View Full Code Here

                Long elapsedMins = null;
                Long reservedMins = null;

                if (this.accountingReader != null) {
                    final ElapsedAndReservedMinutes elapRes =
                            this.accountingReader.
                                 totalElapsedAndReservedMinutesTuple(callerID);

                    final long elapsed = elapRes.getElapsed();
                    final long reserved = elapRes.getReserved();

                    if (elapsed < 0 || reserved < 0) {

                        logger.error("Accounting reader returned negative " +
                                     "value? Aborting.");

                        throw new ResourceRequestDeniedException(
                                             "Request denied, internal issue");
                    }

                    elapsedMins = new Long(elapRes.getElapsed());
                    reservedMins = new Long(elapRes.getReserved());
                }

                final int numWorkspaces =
                        this.currentVMs.countIDsByCaller(callerID);
View Full Code Here

        } else {
            id = caller.getIdentity();
        }

        try {
            final ElapsedAndReservedMinutes earm =
                    this.accounting.totalElapsedAndReservedMinutesTuple(id);
            return this.dataConvert.getUsage(earm);
        } catch (Exception e) {
            throw new ManageException(e.getMessage(), e);
        }
View Full Code Here

TOP

Related Classes of org.globus.workspace.accounting.ElapsedAndReservedMinutes

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.