Package org.rhq.core.domain.operation

Examples of org.rhq.core.domain.operation.OperationScheduleEntity


    }

    @Override
    public void deleteOperationScheduleEntity(ScheduleJobId jobId) {
        try {
            OperationScheduleEntity doomed = findOperationScheduleEntity(jobId);
            if (doomed != null) {
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Deleting schedule entity: " + jobId);
                }
                entityManager.remove(doomed);
View Full Code Here


    }

    @Override
    public void updateOperationScheduleEntity(ScheduleJobId jobId, long nextFireTime) {
        // sched will be managed - just setting the property is enough for it to be committed
        OperationScheduleEntity sched = findOperationScheduleEntity(jobId);
        sched.setNextFireTime(nextFireTime);
        if (LOG.isDebugEnabled()) {
            LOG.debug("Scheduled job has a new next-fire-time: " + sched);
        }
    }
View Full Code Here

        return operationSchedules;
    }

    @Override
    public ResourceOperationSchedule getResourceOperationSchedule(Subject whoami, int scheduleId) {
        OperationScheduleEntity operationScheduleEntity = entityManager.find(OperationScheduleEntity.class, scheduleId);
        try {
            ResourceOperationSchedule resourceOperationSchedule = getResourceOperationSchedule(whoami,
                operationScheduleEntity.getJobId().toString());
            return resourceOperationSchedule;
        } catch (SchedulerException e) {
            throw new RuntimeException("Failed to retrieve ResourceOperationSchedule with id [" + scheduleId + "].", e);
        }
    }
View Full Code Here

        }
    }

    @Override
    public GroupOperationSchedule getGroupOperationSchedule(Subject whoami, int scheduleId) {
        OperationScheduleEntity operationScheduleEntity = entityManager.find(OperationScheduleEntity.class, scheduleId);
        try {
            GroupOperationSchedule groupOperationSchedule = getGroupOperationSchedule(whoami, operationScheduleEntity
                .getJobId().toString());
            return groupOperationSchedule;
        } catch (SchedulerException e) {
            throw new RuntimeException("Failed to retrieve GroupOperationSchedule with id [" + scheduleId + "].", e);
        }
View Full Code Here

            // for jobs created prior to upgrading to RHQ 4.0, the map will not contain an entityId entry,
            // so we'll need to lookup the entity id from the DB.
            String jobName = jobDetail.getName();
            String jobGroup = jobDetail.getGroup();
            ScheduleJobId jobId = new ScheduleJobId(jobName, jobGroup);
            OperationScheduleEntity operationScheduleEntity = findOperationScheduleEntity(jobId);
            entityId = operationScheduleEntity.getId();
        }
        return entityId;
    }
View Full Code Here

        Query query = entityManager.createNamedQuery(OperationScheduleEntity.QUERY_FIND_BY_JOB_ID);
        String jobName = jobId.getJobName();
        query.setParameter("jobName", jobName);
        String jobGroup = jobId.getJobGroup();
        query.setParameter("jobGroup", jobGroup);
        OperationScheduleEntity operationScheduleEntity = (OperationScheduleEntity) query.getSingleResult();
        return operationScheduleEntity;
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.operation.OperationScheduleEntity

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.