Package com.linkedin.d2.discovery.stores.zk

Examples of com.linkedin.d2.discovery.stores.zk.ZKConnection


    reset(false);
  }

  public void reset(boolean useSSL)
  {
    _executorService = new SynchronousExecutorService();
    _uriRegistry = new MockStore<UriProperties>();
    _clusterRegistry = new MockStore<ClusterProperties>();
    _serviceRegistry = new MockStore<ServiceProperties>();
    _clientFactories = new HashMap<String, TransportClientFactory>();
    _loadBalancerStrategyFactories =
View Full Code Here


      _store.put(listenTo, _store.getSerializer()
                                 .fromBytes(discoveryProperties.getBytes("UTF-8")));
    }
    catch (PropertySerializationException e)
    {
      throw new PropertyStoreException(e);
    }
    catch (UnsupportedEncodingException e)
    {
      throw new RuntimeException("UTF-8 should never fail", e);
    }
View Full Code Here

      {
        interrupted = true;
      }
      catch (ExecutionException e)
      {
        throw new PropertyStoreException(e);
      }
    }
  }
View Full Code Here

    {
      callback.get(10, TimeUnit.SECONDS);
    }
    catch (Exception e)
    {
      throw new PropertyStoreException(e);
    }
  }
View Full Code Here

    {
      callback.get(10, TimeUnit.SECONDS);
    }
    catch (Exception e)
    {
      throw new PropertyStoreException(e);
    }
  }
View Full Code Here

    {
      callback.get(10, TimeUnit.SECONDS);
    }
    catch (Exception e)
    {
      throw new PropertyStoreException(e);
    }
  }
View Full Code Here

                   boolean useDeltaWrite,
                   int maxOutstandingWrites)
  {
    _retryLimit = retryLimit;
    // use retry zkConnection
    _zkConnection = new ZKConnection(zkHosts, sessionTimeout, _retryLimit, false, null, 0);
    _basePath = basePath;
    _timeout = timeout;
    _clusterServiceConfigurations = Arrays.asList(clusterServiceConfigurations, extraClusterServiceConfigurations);
    _clusterDefaults = clusterDefaults;
    _serviceDefaults = serviceDefaults;
View Full Code Here

      balancer.start(callback);
      callback.get(30, TimeUnit.SECONDS);

      Directory dir = balancer.getDirectory();

      ZKConnection conn = new ZKConnection("localhost:" + PORT, 30000);
      conn.start();

      ZooKeeperPermanentStore<ServiceProperties> store =
              new ZooKeeperPermanentStore<ServiceProperties>(conn, new ServicePropertiesJsonSerializer(), ZKFSUtil.servicePath(BASE_PATH));
      callback = new FutureCallback<None>();
      store.start(callback);
View Full Code Here

      balancer.start(callback);
      callback.get(30, TimeUnit.SECONDS);

      Directory dir = balancer.getDirectory();

      ZKConnection conn = new ZKConnection("localhost:" + PORT, 30000);
      conn.start();

      ZooKeeperPermanentStore<ClusterProperties> store =
              new ZooKeeperPermanentStore<ClusterProperties>(conn, new ClusterPropertiesJsonSerializer(),
                                                             ZKFSUtil.clusterPath(BASE_PATH));
      callback = new FutureCallback<None>();
View Full Code Here

      FutureCallback<None> callback = new FutureCallback<None>();
      balancer.start(callback);
      callback.get(30, TimeUnit.SECONDS);

      ZKConnection conn = balancer.zkConnection();

      ZooKeeperPermanentStore<ServiceProperties> serviceStore =
              new ZooKeeperPermanentStore<ServiceProperties>(conn,
                                                             new ServicePropertiesJsonSerializer(),
                                                             ZKFSUtil.servicePath(BASE_PATH));
View Full Code Here

TOP

Related Classes of com.linkedin.d2.discovery.stores.zk.ZKConnection

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.