Package com.sun.sgs.kernel.schedule

Examples of com.sun.sgs.kernel.schedule.SchedulerQueue


    /**
     * Task reservation tests.
     */

    @Test public void reserveTask() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        queue.reserveTask(testTask);
    }
View Full Code Here


        SchedulerQueue queue = getQueueInstance();
        queue.reserveTask(testTask);
    }

    @Test public void reserveTaskDelayed() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        queue.reserveTask(new ScheduledTaskImpl(testTask, 100));
    }
View Full Code Here

        SchedulerQueue queue = getQueueInstance();
        queue.reserveTask(new ScheduledTaskImpl(testTask, 100));
    }

    @Test public void reserveTasks() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        queue.reserveTask(testTask);
        queue.reserveTask(testTask);
        queue.reserveTask(testTask);
        queue.reserveTask(testTask);
        queue.reserveTask(testTask);
        queue.reserveTask(testTask);
    }
View Full Code Here

        queue.reserveTask(testTask);
        queue.reserveTask(testTask);
    }

    @Test public void reserveTasksDelayed() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        ScheduledTask delayedTask = new ScheduledTaskImpl(testTask, 100);
        queue.reserveTask(delayedTask);
        queue.reserveTask(delayedTask);
        queue.reserveTask(delayedTask);
        queue.reserveTask(delayedTask);
        queue.reserveTask(delayedTask);
        queue.reserveTask(delayedTask);
    }
View Full Code Here

        queue.reserveTask(delayedTask);
    }

    @Test (expected=NullPointerException.class)
        public void reserveTaskNull() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        queue.reserveTask(null);
    }
View Full Code Here

        SchedulerQueue queue = getQueueInstance();
        queue.reserveTask(null);
    }

    @Test public void useReservedTask() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        TaskReservation reservation = queue.reserveTask(testTask);
        reservation.use();
    }
View Full Code Here

        TaskReservation reservation = queue.reserveTask(testTask);
        reservation.use();
    }

    @Test public void useReservedTaskDelayed() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        TaskReservation reservation =
            queue.reserveTask(new ScheduledTaskImpl(testTask, 100));
        reservation.use();
    }
View Full Code Here

            queue.reserveTask(new ScheduledTaskImpl(testTask, 100));
        reservation.use();
    }

    @Test public void cancelReservedTask() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        TaskReservation reservation = queue.reserveTask(testTask);
        reservation.cancel();
    }
View Full Code Here

        TaskReservation reservation = queue.reserveTask(testTask);
        reservation.cancel();
    }

    @Test public void cancelReservedTaskDelayed() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        TaskReservation reservation =
            queue.reserveTask(new ScheduledTaskImpl(testTask, 100));
        reservation.cancel();
    }
View Full Code Here

        reservation.cancel();
    }

    @Test (expected=IllegalStateException.class)
        public void reuseReservedTask() throws Exception {
        SchedulerQueue queue = getQueueInstance();
        TaskReservation reservation = queue.reserveTask(testTask);
        reservation.use();
        reservation.use();
    }
View Full Code Here

TOP

Related Classes of com.sun.sgs.kernel.schedule.SchedulerQueue

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.