Examples of WatchdogServiceImpl


Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

    }

    @Test public void testConstructorStartServerWithLargeRenewInterval()
  throws Exception
    {
        WatchdogServiceImpl watchdog = null;
  Properties properties = createProperties(
      StandardProperties.APP_NAME, "TestWatchdogServiceImpl",
            StandardProperties.NODE_TYPE, NodeType.coreServerNode.name(),
      WatchdogServerPropertyPrefix + ".port", "0",
      WatchdogServerPropertyPrefix + ".renew.interval",
    Integer.toString(Integer.MAX_VALUE));
  try {
      watchdog =
                new WatchdogServiceImpl(properties, systemRegistry, txnProxy,
          dummyShutdownCtrl);
  } finally {
            if (watchdog != null) watchdog.shutdown();
        }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

    public void run() {
        Version version = new Version(MAJOR_VERSION, MINOR_VERSION);
        dataService.setServiceBinding(VERSION_KEY, version);
    }}, taskOwner);

  WatchdogServiceImpl watchdog =
      new WatchdogServiceImpl(
    SgsTestNode.getDefaultProperties(
        "TestWatchdogServiceImpl", null, null),
    systemRegistry, txnProxy, dummyShutdownCtrl)
  watchdog.shutdown();
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

        Version version =
      new Version(MAJOR_VERSION + 1, MINOR_VERSION);
        dataService.setServiceBinding(VERSION_KEY, version);
    }}, taskOwner);

  new WatchdogServiceImpl(serviceProps, systemRegistry, txnProxy,
        dummyShutdownCtrl)
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

        Version version =
      new Version(MAJOR_VERSION, MINOR_VERSION + 1);
        dataService.setServiceBinding(VERSION_KEY, version);
    }}, taskOwner);

  new WatchdogServiceImpl(serviceProps, systemRegistry, txnProxy,
        dummyShutdownCtrl)
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

                checkHealth(watchdogService, Health.GREEN);
            }
        }, taskOwner);

  DataService dataService = createDataService(serviceProps);
  final WatchdogServiceImpl watchdog =
      new WatchdogServiceImpl(serviceProps, systemRegistry, txnProxy,
            dummyShutdownCtrl);
  try {
            txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    checkHealth(watchdogService, Health.GREEN);
                }
            }, taskOwner);

      watchdogService.shutdown();
      // wait for watchdog's renew to fail...
      Thread.sleep(renewTime * 4);

            txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    checkHealth(watchdog, Health.RED);
                }
            }, taskOwner);

  } finally {
      watchdog.shutdown();
      dataService.shutdown();
  }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

  }
    }

    @Test(expected = IllegalStateException.class)
    public void testGetLocalNodeHealthServiceShuttingDown() throws Exception {
  WatchdogServiceImpl watchdog = new WatchdogServiceImpl(
      SgsTestNode.getDefaultProperties(
    "TestWatchdogServiceImpl", null, null),
      systemRegistry, txnProxy, dummyShutdownCtrl);
  watchdog.shutdown();
  watchdog.getLocalNodeHealth();
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

                }
            }
        }, taskOwner);

  DataService dataService = createDataService(serviceProps);
  final WatchdogServiceImpl watchdog =
      new WatchdogServiceImpl(serviceProps, systemRegistry, txnProxy,
            dummyShutdownCtrl);
  try {
            txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    if (! watchdogService.isLocalNodeAlive()) {
                        fail("Expected watchdogService.isLocalNodeAlive() " +
                             "to return true");
                    }
                }
            }, taskOwner);

      watchdogService.shutdown();
      // wait for watchdog's renew to fail...
      Thread.sleep(renewTime * 4);

            txnScheduler.runTask(new TestAbstractKernelRunnable() {
                public void run() throws Exception {
                    if (watchdog.isLocalNodeAlive()) {
                        fail("Expected watchdogService.isLocalNodeAlive() " +
                             "to return false");
                    }
                }
            }, taskOwner);
     
  } finally {
      watchdog.shutdown();
      dataService.shutdown();
  }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

  }
    }

    @Test(expected = IllegalStateException.class)
    public void testIsLocalNodeAliveServiceShuttingDown() throws Exception {
  WatchdogServiceImpl watchdog = new WatchdogServiceImpl(
      SgsTestNode.getDefaultProperties(
    "TestWatchdogServiceImpl", null, null),
      systemRegistry, txnProxy, dummyShutdownCtrl);
  watchdog.shutdown();
  watchdog.isLocalNodeAlive();
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

     "NonTransactional() to return true");
  }

  int port = watchdogService.getServer().getPort();
  DataService dataService = createDataService(serviceProps);
  WatchdogServiceImpl watchdog =
      new WatchdogServiceImpl(serviceProps, systemRegistry, txnProxy,
            dummyShutdownCtrl);
  try {
      if (! watchdog.isLocalNodeAliveNonTransactional()) {
    fail("Expected watchdog.isLocalNodeAliveNonTransactional() " +
         "to return true");
      }
      watchdogService.shutdown();
      // wait for watchdog's renew to fail...
      Thread.sleep(renewTime * 4);
      if (watchdog.isLocalNodeAliveNonTransactional()) {
    fail("Expected watchdog.isLocalNodeAliveNonTransactional() " +
         "to return false");
      }
     
  } finally {
      dataService.shutdown();
      watchdog.shutdown();
  }
    }
View Full Code Here

Examples of com.sun.sgs.impl.service.watchdog.WatchdogServiceImpl

    @Test(expected = IllegalStateException.class)
    public void testIsLocalNodeAliveNonTransactionalServiceShuttingDown()
  throws Exception
    {
  WatchdogServiceImpl watchdog = new WatchdogServiceImpl(
      SgsTestNode.getDefaultProperties(
    "TestWatchdogServiceImpl", null, null),
      systemRegistry, txnProxy, dummyShutdownCtrl);
  watchdog.shutdown();
  watchdog.isLocalNodeAliveNonTransactional();
    }
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.