Package com.linkedin.d2.discovery.util

Examples of com.linkedin.d2.discovery.util.Stats


    {
      final ConsistentHashRing<URI> ring = new ConsistentHashRing<URI>(map);
      rings.add(ring);
    }

    return new ConsistentHashKeyMapper(new StaticRingProvider(rings), new TestPartitionInfoProvider());
  }
View Full Code Here


    {
      final ConsistentHashRing<URI> ring = new ConsistentHashRing<URI>(map);
      rings.add(ring);
    }

    return new ConsistentHashKeyMapper(new StaticRingProvider(rings), new TestPartitionInfoProvider());
  }
View Full Code Here

  private ZKFSLoadBalancer.TogglingLoadBalancerFactory createLoadBalancerFactory(D2ClientConfig config)
  {
    final ZKFSTogglingLoadBalancerFactoryImpl.ComponentFactory loadBalancerComponentFactory;
    if (config.componentFactory == null)
    {
      loadBalancerComponentFactory = new ZKFSComponentFactory();
    }
    else
    {
      loadBalancerComponentFactory = config.componentFactory;
    }
View Full Code Here

{

  @Override
  public LoadBalancerWithFacilities create(D2ClientConfig config)
  {
    return  new ZKFSLoadBalancer(config.zkHosts,
                                    (int) config.zkSessionTimeoutInMs,
                                    (int) config.zkStartupTimeoutInMs,
                                    createLoadBalancerFactory(config),
                                    config.flagFile,
                                    config.basePath,
View Full Code Here

    }

    final Map<String, LoadBalancerStrategyFactory<? extends LoadBalancerStrategy>> loadBalancerStrategyFactories =
        createDefaultLoadBalancerStrategyFactories();

    return new ZKFSTogglingLoadBalancerFactoryImpl(loadBalancerComponentFactory,
                                                   config.lbWaitTimeout,
                                                   config.lbWaitUnit,
                                                   config.basePath,
                                                   config.fsBasePath,
                                                   config.clientFactories,
View Full Code Here

      Map<String, Object> untyped = JacksonUtil.getObjectMapper().readValue(new String(bytes, "UTF-8"), HashMap.class);
      return fromMap(untyped);
    }
    catch (Exception e)
    {
      throw new PropertySerializationException(e);
    }
  }
View Full Code Here

      return fromMap(untyped);

    }
    catch (Exception e)
    {
      throw new PropertySerializationException(e);
    }
  }
View Full Code Here

  }

  @Override
  public void register(final PropertyEventSubscriber<T> listener)
  {
    _thread.send(new PropertyEvent("PropertyEventBus.registerAll")
    {
      @Override
      public void innerRun()
      {
        _allPropertySubscribers.add(listener);
View Full Code Here

  }

  @Override
  public void unregister(final PropertyEventSubscriber<T> listener)
  {
    _thread.send(new PropertyEvent("PropertyEventBus.unregisterAll")
    {
      @Override
      public void innerRun()
      {
        _allPropertySubscribers.remove(listener);
View Full Code Here

  @Override
  public void register(final Set<String> propertyNames,
                       final PropertyEventSubscriber<T> subscriber)
  {
    _thread.send(new PropertyEvent("PropertyEventBus.register " + propertyNames)
    {
      public void innerRun()
      {
        for (final String prop : propertyNames)
        {
View Full Code Here

TOP

Related Classes of com.linkedin.d2.discovery.util.Stats

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.