Package com.sun.sgs.app

Examples of com.sun.sgs.app.PeriodicTaskHandle


        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
                public void run() {
                    Counter counter = getClearedCounter();
                    for (int i = 0; i < 3; i++) {
                        PeriodicTaskHandle handle =
                            taskService.schedulePeriodicTask(
                                new NonManagedTask(owner), 20L * i, 500L);
                        dataService.setBinding("runHandle." + i,
                                               new ManagedHandle(handle));
                        counter.increment();
View Full Code Here


            new TestAbstractKernelRunnable() {
                public void run() {
                    getClearedCounter();

                    // test the basic cancel operation, within a transaction
                    PeriodicTaskHandle handle =
                        taskService.schedulePeriodicTask(
                                            new ManagedTask(), 100L, 100L);
                    try {
                        handle.cancel();
                    } catch (Exception e) {
                        fail("Did not expect Exception: " + e);
                    }

                    // test the basic cancel operation, between transactions
View Full Code Here

    public void testCancelPeriodicTasksTwice() throws Exception {
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
                public void run() {   
                    // test the basic cancel operation, within a transaction
                    PeriodicTaskHandle handle =
                        taskService.schedulePeriodicTask(
                                            new ManagedTask(), 100L, 100L);
                    handle.cancel();
                    try {
                        handle.cancel();
                        fail("Expected ObjectNotFoundException");
                    } catch (ObjectNotFoundException e) {
                        System.err.println(e);
                    }
View Full Code Here

            new TestAbstractKernelRunnable() {
                public void run() {
                    getClearedCounter();
                    ManagedTask task = new ManagedTask();
                    dataService.setBinding("TestTaskServiceImpl.task", task);
                    PeriodicTaskHandle handle =
                        taskService.schedulePeriodicTask(task, 500L, 100L);
                    dataService.setBinding("TestTaskServiceImpl.handle",
                                           new ManagedHandle(handle));
                }
         }, taskOwner);
View Full Code Here

TOP

Related Classes of com.sun.sgs.app.PeriodicTaskHandle

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.