Examples of watch()


Examples of com.sun.enterprise.deployment.backend.ProcessWatcher.watch()

               
                int exitValue=-1;
                try {
                    Process p = Runtime.getRuntime().exec(command);
                    ProcessWatcher pw = new ProcessWatcher(p);
                    exitValue = pw.watch();
                } catch(Exception e) {
                    e.printStackTrace();
                }
                if (exitValue==0) {
                    if (logger!=null)
View Full Code Here

Examples of com.surftools.BeanstalkClient.Client.watch()

    } catch (Exception e) {
      fail("caught unexpected exception: " + e.getClass().getCanonicalName() + ", " + e.getMessage());
    }

    try {
      client.watch(null);
      fail("didn't throw");
    } catch (BeanstalkException be) {
      assertEquals("null tubeName", be.getMessage());
    } catch (Exception e) {
      fail("caught unexpected exception: " + e.getClass().getCanonicalName() + ", " + e.getMessage());
View Full Code Here

Examples of com.surftools.BeanstalkClientImpl.ClientImpl.watch()

        /* FIXME: There is a problem in JavaBeanstalkClient 1.4.4 (at least in 1.4.4),
           when using uniqueConnectionPerThread=false. The symptom is that ProtocolHandler
           breaks the protocol, reading incomplete messages. To be investigated. */
        //client.setUniqueConnectionPerThread(false);
        for (String tube : tubes) {
            client.watch(tube);
        }
        return client;
    }

    @Override
View Full Code Here

Examples of com.twitter.common.zookeeper.ServerSet.watch()

    executor.submit(new Callable<Void>() {
      @Override
      public Void call() throws Exception {
        ServerSet schedulerService = new ServerSetImpl(zkClient, SERVERSET_PATH);
        final CountDownLatch schedulerReady = new CountDownLatch(1);
        schedulerService.watch(new HostChangeMonitor<ServiceInstance>() {
          @Override
          public void onChange(ImmutableSet<ServiceInstance> hostSet) {
            if (!hostSet.isEmpty()) {
              schedulerReady.countDown();
            }
View Full Code Here

Examples of com.twitter.common.zookeeper.ServerSetImpl.watch()

    executor.submit(new Callable<Void>() {
      @Override
      public Void call() throws Exception {
        ServerSet schedulerService = new ServerSetImpl(zkClient, SERVERSET_PATH);
        final CountDownLatch schedulerReady = new CountDownLatch(1);
        schedulerService.watch(new HostChangeMonitor<ServiceInstance>() {
          @Override
          public void onChange(ImmutableSet<ServiceInstance> hostSet) {
            if (!hostSet.isEmpty()) {
              schedulerReady.countDown();
            }
View Full Code Here

Examples of com.vmware.vim.cf.CacheInstance.watch()

    Folder rootFolder = si.getRootFolder();
    ManagedEntity[] vms = new InventoryNavigator(rootFolder).searchManagedEntities("VirtualMachine");
    ManagedEntity[] hosts = new InventoryNavigator(rootFolder).searchManagedEntities("HostSystem");
 
    CacheInstance vicf = new CacheInstance(si);
    vicf.watch(vms, new String[] {"name", "runtime.powerState", "summary"});
    vicf.watch(hosts, new String[] {"name", "summary"});
    vicf.start();

    //check if the caching is ready to use; otherwise wait
    while(!vicf.isReady())
View Full Code Here

Examples of it.hakvoort.neuroclient.agent.DisplayAgent.watch()

   
    // get the role of this agent
    RoleReply roleReply = agent.getRole();
   
    // start watching client 0
    agent.watch(0);
   
    // stop watching client 0
    agent.unwatch(0);   

    // close the agent and disconnect from NeuroServer.
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.watch()

    }
  }

  private void watch(String cluster, String path, ConcurrentMap<String, WatchChildren> map) {
    WatchChildren watchForTables = new WatchChildren(_zookeeper, path);
    watchForTables.watch(new OnChange() {
      @Override
      public void action(List<String> children) {
        LOG.info("Layout change.");
        updateLayout();
      }
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.watch()

  }

  private WatchChildren watchForShardServerChanges() {
    WatchChildren watchOnlineShards = new WatchChildren(_zookeeper,
        ZookeeperPathConstants.getOnlineShardsPath(_cluster));
    watchOnlineShards.watch(new OnChange() {
      private List<String> _prevOnlineShards = new ArrayList<String>();

      @Override
      public void action(List<String> onlineShards) {
        List<String> oldOnlineShards = _prevOnlineShards;
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.watch()

    String path = ZookeeperPathConstants.getTablesPath(cluster);
    if (map.containsKey(cluster)) {
      return;
    }
    WatchChildren watchForTableLayoutChanges = new WatchChildren(_zookeeper, path);
    watchForTableLayoutChanges.watch(new OnChange() {
      @Override
      public void action(List<String> children) {
        LOG.info("Layout change for cluster [{0}].", cluster);
        updateLayout(cluster);
      }
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.