Examples of runTask()


Examples of com.sun.sgs.kernel.TransactionScheduler.runTask()

            throws Exception
        {
            TransactionScheduler transactionScheduler =
                systemRegistry.getComponent(TransactionScheduler.class);

            transactionScheduler.runTask(
    new AbstractKernelRunnable("UseStartupContext") {
        public void run() {
                        DataManager data = AppContext.getDataManager();
                        System.out.println("Data manager is " + data);
        } },  txnProxy.getCurrentOwner());
View Full Code Here

Examples of com.sun.sgs.kernel.TransactionScheduler.runTask()

  System.err.println("sending messages to client [" + client.name + "]");
        TransactionScheduler transactionScheduler =
            node.getSystemRegistry(). getComponent(TransactionScheduler.class);
  for (int i = 0; i < numMessages; i++) {
      final int x = i + offset;
      transactionScheduler.runTask(new TestAbstractKernelRunnable() {
    public void run() {
        ClientSession session = (ClientSession)
      AppContext.getDataManager().getBinding(client.name);
      ByteBuffer buf = ByteBuffer.allocate(4);
      buf.putInt(x).flip();
View Full Code Here

Examples of com.sun.sgs.kernel.TransactionScheduler.runTask()

            // The server node that reported the remote
            // failure should be unaffected
            TransactionScheduler sched = server.getSystemRegistry().
                    getComponent(TransactionScheduler.class);
            Identity own = server.getProxy().getCurrentOwner();
            sched.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    assertTrue(server.getWatchdogService().isLocalNodeAlive());
                }
            }, own);
View Full Code Here

Examples of com.sun.sgs.kernel.TransactionScheduler.runTask()

            try {
                // The node should have failed
                sched = node.getSystemRegistry().
                        getComponent(TransactionScheduler.class);
                own = node.getProxy().getCurrentOwner();
                sched.runTask(new TestAbstractKernelRunnable() {
                    public void run() throws Exception {
                        if (node.getWatchdogService().isLocalNodeAlive()) {
                            fail("Expected watchdogService.isLocalNodeAlive() " +
                                    "to return false");
                        }
View Full Code Here

Examples of com.sun.sgs.kernel.TransactionScheduler.runTask()

                getSystemRegistry().getComponent(TransactionScheduler.class);
       
        GetManagerTask task = new GetManagerTask();
        ts1.runTask(task, new DummyIdentity("first"));
        Object o1 = task.getManager();
        ts2.runTask(task, new DummyIdentity("second"));
        Object o2 = task.getManager();
        assertNotSame("expected different managers!", o1, o2);
       
        // Now reset to the first manager
        ts1.runTask(task, new DummyIdentity("first"));
View Full Code Here

Examples of com.sun.sgs.kernel.TransactionScheduler.runTask()

  System.err.println("sending messages to client [" + client.name + "]");
        TransactionScheduler transactionScheduler =
            node.getSystemRegistry(). getComponent(TransactionScheduler.class);
  for (int i = 0; i < numMessages; i++) {
      final int x = i + offset;
      transactionScheduler.runTask(new TestAbstractKernelRunnable() {
    public void run() {
        ClientSession session = (ClientSession)
      AppContext.getDataManager().getBinding(client.name);
      ByteBuffer buf = ByteBuffer.allocate(4);
      buf.putInt(x).flip();
View Full Code Here

Examples of com.sun.sgs.kernel.TransactionScheduler.runTask()

  System.err.println("sending messages to client [" + client.name + "]");
        TransactionScheduler transactionScheduler =
            node.getSystemRegistry(). getComponent(TransactionScheduler.class);
  for (int i = 0; i < numMessages; i++) {
      final int x = i + offset;
      transactionScheduler.runTask(new TestAbstractKernelRunnable() {
    public void run() {
        ClientSession session = (ClientSession)
      AppContext.getDataManager().getBinding(client.name);
      ByteBuffer buf = ByteBuffer.allocate(4);
      buf.putInt(x).flip();
View Full Code Here

Examples of com.sun.sgs.kernel.TransactionScheduler.runTask()

            // The server node that reported the remote
            // failure should be unaffected
            TransactionScheduler sched = server.getSystemRegistry().
                    getComponent(TransactionScheduler.class);
            Identity own = server.getProxy().getCurrentOwner();
            sched.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    assertTrue(server.getWatchdogService().isLocalNodeAlive());
                }
            }, own);
View Full Code Here

Examples of com.sun.sgs.kernel.TransactionScheduler.runTask()

            try {
                // The node should have failed
                sched = node.getSystemRegistry().
                        getComponent(TransactionScheduler.class);
                own = node.getProxy().getCurrentOwner();
                sched.runTask(new TestAbstractKernelRunnable() {
                    public void run() throws Exception {
                        if (node.getWatchdogService().isLocalNodeAlive()) {
                            fail("Expected watchdogService.isLocalNodeAlive() " +
                                    "to return false");
                        }
View Full Code Here

Examples of org.apache.roller.weblogger.planet.tasks.RefreshRollerPlanetTask.runTask()

            assertNotNull(planetObject);
            PlanetGroup group = planet.getGroup(planetObject, "all");
            assertEquals(1, group.getSubscriptions().size());

            RefreshRollerPlanetTask refreshTask = new RefreshRollerPlanetTask();
            refreshTask.runTask();
           
            planetObject = planet.getPlanet("default");
            group = planet.getGroup(planetObject, "all");
            List agg = planet.getEntries(group, 0, -1);
            assertEquals(3, agg.size());
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.