Examples of HaWorkVO


Examples of com.cloud.ha.HaWorkVO

            if (vos.size() == 0) {
                txn.commit();
                return null;
            }

            final HaWorkVO work = vos.get(0);
            work.setServerId(serverId);
            work.setDateTaken(new Date());

            update(work.getId(), work);

            txn.commit();

            return work;
View Full Code Here

Examples of com.cloud.ha.HaWorkVO

    public void deleteMigrationWorkItems(final long hostId, final WorkType type, final long serverId) {
        final SearchCriteria<HaWorkVO> sc = UntakenMigrationSearch.create();
        sc.setParameters("host", hostId);
        sc.setParameters("type", type.toString());

        HaWorkVO work = createForUpdate();
        Date date = new Date();
        work.setDateTaken(date);
        work.setServerId(serverId);
        work.setStep(Step.Cancelled);

        update(work, sc);
    }
View Full Code Here

Examples of com.cloud.ha.HaWorkVO

    public int releaseWorkItems(long nodeId) {
        SearchCriteria<HaWorkVO> sc = ReleaseSearch.create();
        sc.setParameters("server", nodeId);
        sc.setParameters("step", Step.Done, Step.Cancelled, Step.Error);

        HaWorkVO vo = createForUpdate();
        vo.setDateTaken(null);
        vo.setServerId(null);

        return update(vo, sc);
    }
View Full Code Here

Examples of com.cloud.ha.HaWorkVO

            if (vos.size() == 0) {
                txn.commit();
                return null;
            }

            final HaWorkVO work = vos.get(0);
            work.setServerId(serverId);
            work.setDateTaken(new Date());

            update(work.getId(), work);

            txn.commit();

            return work;
View Full Code Here

Examples of com.cloud.ha.HaWorkVO

    public void deleteMigrationWorkItems(final long hostId, final WorkType type, final long serverId) {
        final SearchCriteria<HaWorkVO> sc = UntakenMigrationSearch.create();
        sc.setParameters("host", hostId);
        sc.setParameters("type", type.toString());

        HaWorkVO work = createForUpdate();
        Date date = new Date();
        work.setDateTaken(date);
        work.setServerId(serverId);
        work.setStep(HighAvailabilityManager.Step.Cancelled);
       
        update(work, sc);
    }
View Full Code Here

Examples of com.cloud.ha.HaWorkVO

    public int releaseWorkItems(long nodeId) {
        SearchCriteria<HaWorkVO> sc = ReleaseSearch.create();
        sc.setParameters("server", nodeId);
        sc.setParameters("step", Step.Done, Step.Cancelled, Step.Error);
       
        HaWorkVO vo = createForUpdate();
        vo.setDateTaken(null);
        vo.setServerId(null);
       
        return update(vo, sc);
    }
View Full Code Here

Examples of com.cloud.ha.HaWorkVO

            if (vos.size() == 0) {
                txn.commit();
                return null;
            }

            final HaWorkVO work = vos.get(0);
            work.setServerId(serverId);
            work.setDateTaken(new Date());

            update(work.getId(), work);

            txn.commit();

            return work;
View Full Code Here

Examples of com.cloud.ha.HaWorkVO

    public void deleteMigrationWorkItems(final long hostId, final WorkType type, final long serverId) {
        final SearchCriteria<HaWorkVO> sc = UntakenMigrationSearch.create();
        sc.setParameters("host", hostId);
        sc.setParameters("type", type.toString());

        HaWorkVO work = createForUpdate();
        Date date = new Date();
        work.setDateTaken(date);
        work.setServerId(serverId);
        work.setStep(Step.Cancelled);

        update(work, sc);
    }
View Full Code Here

Examples of com.cloud.ha.HaWorkVO

    public int releaseWorkItems(long nodeId) {
        SearchCriteria<HaWorkVO> sc = ReleaseSearch.create();
        sc.setParameters("server", nodeId);
        sc.setParameters("step", Step.Done, Step.Cancelled, Step.Error);

        HaWorkVO vo = createForUpdate();
        vo.setDateTaken(null);
        vo.setServerId(null);

        return update(vo, sc);
    }
View Full Code Here

Examples of com.cloud.ha.HaWorkVO

            if (vos.size() == 0) {
                txn.commit();
                return null;
            }

            final HaWorkVO work = vos.get(0);
            work.setServerId(serverId);
            work.setDateTaken(new Date());

            update(work.getId(), work);

            txn.commit();

            return work;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.