Package com.netflix.curator.framework.api

Examples of com.netflix.curator.framework.api.CuratorListener


  public CuratorFramework mkClient(Map conf, List<String> servers,
      Object port, String root, final WatcherCallBack watcher) {

    CuratorFramework fk = Utils.newCurator(conf, servers, port, root);

    fk.getCuratorListenable().addListener(new CuratorListener() {
      @Override
      public void eventReceived(CuratorFramework _fk, CuratorEvent e)
          throws Exception {

        if (e.getType().equals(CuratorEventType.WATCHED)) {
View Full Code Here


    @Override
    public void connect(final Watcher watcher)
    {
        if ( watcher != null )
        {
            CuratorListener     localListener = new CuratorListener()
            {
                @Override
                public void eventReceived(CuratorFramework client, CuratorEvent event) throws Exception
                {
                    if ( event.getWatchedEvent() != null )
View Full Code Here

    @Override
    public void close() throws InterruptedException
    {
        // NOTE: the curator instance is NOT closed here

        CuratorListener localListener = listener.getAndSet(null);
        if ( localListener != null )
        {
            curator.getCuratorListenable().removeListener(localListener);
        }
    }
View Full Code Here

TOP

Related Classes of com.netflix.curator.framework.api.CuratorListener

Copyright © 2018 www.massapicom. 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.