Package org.glite.ce.creamapi.jobmanagement

Examples of org.glite.ce.creamapi.jobmanagement.Lease


        logger.debug("Begin getLease");
        List<Lease> leaseList = new ArrayList<Lease>(0);

        try {
            if (command.containsParameterKey("LEASE_ID")) {
                Lease lease = jobDB.retrieveJobLease(command.getParameterAsString("LEASE_ID"), command.getUserId());
                if (lease != null) {
                    leaseList.add(lease);
                }
            } else {
                List<Lease> lease = jobDB.retrieveJobLease(command.getUserId());
View Full Code Here


        try {
            Long timestamp = Long.parseLong(command.getParameterAsString("LEASE_TIME"));
            leaseTime = Calendar.getInstance();
            leaseTime.setTimeInMillis(timestamp);
            logger.debug("leaseTime = " + leaseTime.getTime());
            Lease lease = new Lease();
            lease.setLeaseId(leaseId);
            lease.setUserId(userId);
            lease.setLeaseTime(leaseTime);
            boundedLeaseTime = leaseManager.setLease(lease);
            command.getResult().addParameter("LEASE_TIME", boundedLeaseTime);
            logger.debug("boundedLeaseTime = " + boundedLeaseTime);
        } catch (IllegalArgumentException e) {
            logger.error(e.getMessage());
View Full Code Here

            if (cmd.containsParameterKey("LEASE_ID")) {
                String leaseId = cmd.getParameterAsString("LEASE_ID");

                if (leaseId != null && leaseId.length() > 0) {
                    Lease lease = jobDB.retrieveJobLease(leaseId, userId);
                    if (lease != null) {
                        logger.debug("found lease \"" + leaseId + "\" = " + lease.getLeaseTime().getTime());
                        job.setLease(lease);
                    } else {
                        throw new CommandException("lease id \"" + leaseId + "\" not found!");
                    }
                }
View Full Code Here

TOP

Related Classes of org.glite.ce.creamapi.jobmanagement.Lease

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.