Examples of KernelRunnable


Examples of com.sun.sgs.kernel.KernelRunnable

    @Test
    public void testRunNonDurableTransactionalTasks() throws Exception {
        final CountDownLatch latch = new CountDownLatch(2);
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    KernelRunnable r = new TestAbstractKernelRunnable() {
                            public void run() throws Exception {
                                if (! txnProxy.getCurrentOwner().
                                    equals(taskOwner)) {
                                    throw new RuntimeException("New identity");
                                }
View Full Code Here

Examples of com.sun.sgs.kernel.KernelRunnable

    @Test
    public void testRunNonDurableNonTransactionalTasks() throws Exception {
        final CountDownLatch latch = new CountDownLatch(2);
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    KernelRunnable r = new TestAbstractKernelRunnable() {
                            public void run() throws Exception {
                                if (! txnProxy.getCurrentOwner().
                                    equals(taskOwner)) {
                                    throw new RuntimeException("New identity");
                                }
View Full Code Here

Examples of com.sun.sgs.kernel.KernelRunnable

    public void testRunNonDurableWithNewIdentity() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    Identity owner = txnProxy.getCurrentOwner();
                    KernelRunnable r =
                        new NewIdentityKernelRunnable(owner, latch);
                    taskService.scheduleNonDurableTask(r, true);
                }
            }, taskOwner);
        assertTrue(latch.await(100L, TimeUnit.MILLISECONDS));
View Full Code Here

Examples of com.sun.sgs.kernel.KernelRunnable

    public void testRunDelayedNonDurableWithNewIdentity() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    Identity owner = txnProxy.getCurrentOwner();
                    KernelRunnable r =
                        new NewIdentityKernelRunnable(owner, latch);
                    taskService.scheduleNonDurableTask(r, 50L, true);
                }
            }, taskOwner);
        assertTrue(latch.await(100L, TimeUnit.MILLISECONDS));
View Full Code Here

Examples of com.sun.sgs.kernel.KernelRunnable

    @Test
    public void testScheduleNonDurableTaskNegativeTime() throws Exception {
        txnScheduler.runTask(
            new TestAbstractKernelRunnable() {
                public void run() {
                    KernelRunnable r = new DummyKernelRunnable();
                    try {
                        taskService.scheduleNonDurableTask(r, -1L, false);
                        fail("Expected IllegalArgumentException");
                    } catch (IllegalArgumentException e) {
                        System.err.println(e);
View Full Code Here

Examples of com.sun.sgs.kernel.KernelRunnable

    @Test
    public void testRunImmediateNonDurableTasks() throws Exception {
        final CountDownLatch latch = new CountDownLatch(3);
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    KernelRunnable r = new TestAbstractKernelRunnable() {
                            public void run() throws Exception {
                                if (! txnProxy.getCurrentOwner().
                                    equals(taskOwner)) {
                                    throw new RuntimeException("New identity");
                                }
View Full Code Here

Examples of com.sun.sgs.kernel.KernelRunnable

    @Test
    public void testRunPendingNonDurableTasks() throws Exception {
        final CountDownLatch latch = new CountDownLatch(3);
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    KernelRunnable r = new TestAbstractKernelRunnable() {
                            public void run() throws Exception {
                                if (! txnProxy.getCurrentOwner().
                                    equals(taskOwner)) {
                                    throw new RuntimeException("New identity");
                                }
View Full Code Here

Examples of com.sun.sgs.kernel.KernelRunnable

    @Test
    public void testRunNonDurableTransactionalTasks() throws Exception {
        final CountDownLatch latch = new CountDownLatch(2);
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    KernelRunnable r = new TestAbstractKernelRunnable() {
                            public void run() throws Exception {
                                if (! txnProxy.getCurrentOwner().
                                    equals(taskOwner)) {
                                    throw new RuntimeException("New identity");
                                }
View Full Code Here

Examples of com.sun.sgs.kernel.KernelRunnable

    @Test
    public void testRunNonDurableNonTransactionalTasks() throws Exception {
        final CountDownLatch latch = new CountDownLatch(2);
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    KernelRunnable r = new TestAbstractKernelRunnable() {
                            public void run() throws Exception {
                                if (! txnProxy.getCurrentOwner().
                                    equals(taskOwner)) {
                                    throw new RuntimeException("New identity");
                                }
View Full Code Here

Examples of com.sun.sgs.kernel.KernelRunnable

    public void testRunNonDurableWithNewIdentity() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    Identity owner = txnProxy.getCurrentOwner();
                    KernelRunnable r =
                        new NewIdentityKernelRunnable(owner, latch);
                    taskService.scheduleNonDurableTask(r, true);
                }
            }, taskOwner);
        assertTrue(latch.await(100L, TimeUnit.MILLISECONDS));
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.