Examples of NodeListener


Examples of at.salzburgresearch.nodekeeper.NodeListener

    }

    private void activateRule(final Rule rule) throws NodeKeeperException, IOException, InterruptedException {

        //handle event
        rule.setNodeListener(new NodeListener() {

            private void execute(Node node) throws InterruptedException, IOException, NodeKeeperException {
                HashMap<String,String> bindings = bindVariables(node);
                if(checkConditions(bindings)) {
                    for(Action action : rule.actions) {
View Full Code Here

Examples of at.salzburgresearch.nodekeeper.NodeListener

    }

    private void activateRule(final Rule rule) throws NodeKeeperException, IOException, InterruptedException {

        //handle event
        rule.setNodeListener(new NodeListener() {

            private void execute(Node node) throws InterruptedException, IOException, NodeKeeperException {
                HashMap<String,String> bindings = bindVariables(node);
                if(checkConditions(bindings)) {
                    for(Action action : rule.actions) {
View Full Code Here

Examples of com.flaptor.clusterfest.NodeListener

            logger.info("MultiIndexer will NOT be using XsltModule");
        }

        if (config.getBoolean("clustering.enable")) {
          int port = PortUtil.getPort("clustering.rpc.indexer");
        nodeListener = new NodeListener(port, config);
            ControllerModule.addModuleListener(nodeListener, new ControllableImplementation());
        indexerMonitoredNode = IndexerMonitoredNode.getInstance();
        MonitorModule.addModuleListener(nodeListener, IndexerMonitoredNode.getInstance());
        nodeListener.start();
        }
View Full Code Here

Examples of com.flaptor.clusterfest.NodeListener

            frameTemplate = new StringTemplate(config.getString("HTTPCacheServer.frameTemplate"));
            notFoundTemplate = new StringTemplate(config.getString("HTTPCacheServer.notFound"));

          if (config.getBoolean("clustering.enable")) {
              int port = PortUtil.getPort("clustering.rpc.cacheServer");
            nodeListener = new NodeListener(port, config);
            MonitorModule.addModuleListener(nodeListener, new CacheServerMonitoredNode(this));
            ControllerModule.addModuleListener(nodeListener, new ControllableImplementation());
                DeployModule.addModuleListener(nodeListener, new DeployListenerImplementation());
            nodeListener.start();
            }
View Full Code Here

Examples of com.flaptor.clusterfest.NodeListener

        stopMonitor = new StopMonitor("stop");
        urlFilter = new UrlFilter();

      if (config.getBoolean("clustering.enable")) {
          int port = PortUtil.getPort("clustering.rpc.crawler");
        nodeListener = new NodeListener(port, config);
        MonitorModule.addModuleListener(nodeListener, new CrawlerMonitoredNode(this));
        ControllerModule.addModuleListener(nodeListener, new ControllableImplementation());
        nodeListener.addModuleListener("crawlerControl", new CrawlerControllableImplementation());
            DeployModule.addModuleListener(nodeListener, new DeployListenerImplementation());
        nodeListener.start();
View Full Code Here

Examples of com.flaptor.clusterfest.NodeListener

    public Indexer() {

        Config config = Config.getConfig("indexer.properties");
        if (config.getBoolean("clustering.enable")) {
          int port = PortUtil.getPort("clustering.rpc.indexer");
        nodeListener = new NodeListener(port, config);
            ControllerModule.addModuleListener(nodeListener, new ControllableImplementation());
        indexerMonitoredNode = IndexerMonitoredNode.getInstance();
        MonitorModule.addModuleListener(nodeListener, IndexerMonitoredNode.getInstance());
        ActionModule.addModuleListener(nodeListener, new IndexerActionReceiver(this));
        DeployModule.addModuleListener(nodeListener, new DeployListenerImplementation());
View Full Code Here

Examples of com.flaptor.clusterfest.NodeListener

          if (searcherConfig.getBoolean("searcher.isMultiSearcher")) {
              searcherConfig.set("clustering.node.type", "multisearcher");
          } else {
              searcherConfig.set("clustering.node.type", "searcher");
          }
          nodeListener = new NodeListener(port, searcherConfig);
        MonitorModule.addModuleListener(nodeListener, new SearcherMonitoredNode(this));
        ControllerModule.addModuleListener(nodeListener, new ControllableImplementation());
            DeployModule.addModuleListener(nodeListener, new DeployListenerImplementation());
        nodeListener.start();
        }
View Full Code Here

Examples of com.sun.sgs.service.NodeListener

     * @throws  IllegalStateException if this service is shutting down
     */
    private void notifyNodeListeners(final Node node) {

  for (NodeListener listener : nodeListeners.keySet()) {
      final NodeListener nodeListener = listener;
      taskScheduler.scheduleTask(
    new AbstractKernelRunnable("NotifyNodeListeners") {
        public void run() {
      if (!shuttingDown() &&
                            isLocalNodeAliveNonTransactional())
      {
          if (node.isAlive()) {
        nodeListener.nodeStarted(node);
          } else {
        nodeListener.nodeFailed(node);
          }
      }
        }
    }, taskOwner);
  }
View Full Code Here

Examples of com.sun.sgs.service.NodeListener

     * @throws  IllegalStateException if this service is shutting down
     */
    private void notifyNodeListeners(final Node node) {

  for (NodeListener listener : nodeListeners.keySet()) {
      final NodeListener nodeListener = listener;
      taskScheduler.scheduleTask(
    new AbstractKernelRunnable("NotifyNodeListeners") {
        public void run() {
      if (!shuttingDown() &&
                            isLocalNodeAliveNonTransactional())
      {
                            nodeListener.nodeHealthUpdate(node);
      }
        }
    }, taskOwner);
  }
    }
View Full Code Here

Examples of com.sun.sgs.service.NodeListener

     * @throws  IllegalStateException if this service is shutting down
     */
    private void notifyNodeListeners(final Node node) {

  for (NodeListener listener : nodeListeners.keySet()) {
      final NodeListener nodeListener = listener;
      taskScheduler.scheduleTask(
    new AbstractKernelRunnable("NotifyNodeListeners") {
        public void run() {
      if (!shuttingDown() &&
                            isLocalNodeAliveNonTransactional())
      {
                            nodeListener.nodeHealthUpdate(node);
      }
        }
    }, taskOwner);
  }
    }
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.