Package com.linkedin.databus.client.pub.ServerInfo

Examples of com.linkedin.databus.client.pub.ServerInfo.ServerInfoBuilder


          throws InvalidConfigException
  {
    RuntimeConfigBuilder rtConfigBuilder =
        (RuntimeConfigBuilder)client.getClientConfigManager().getConfigBuilder();

    ServerInfoBuilder relayConfigBuilder = rtConfigBuilder.getRelay(Integer.toString(id));
    relayConfigBuilder.setName(name);
    relayConfigBuilder.setHost(addr.getHostName());
    relayConfigBuilder.setPort(addr.getPort());
    relayConfigBuilder.setSources(sources);
    ServerInfo si = relayConfigBuilder.build();
    client.getClientConfigManager().setNewConfig(rtConfigBuilder.build());
    return si;
  }
View Full Code Here


          throws InvalidConfigException
  {
    RuntimeConfigBuilder rtConfigBuilder =
        (RuntimeConfigBuilder)client.getClientConfigManager().getConfigBuilder();

    ServerInfoBuilder relayConfigBuilder = rtConfigBuilder.getRelay(Integer.toString(id));
    relayConfigBuilder.setName(name);
    relayConfigBuilder.setHost(addr.getHostName());
    relayConfigBuilder.setPort(addr.getPort());
    relayConfigBuilder.setSources(sources);
    ServerInfo si = relayConfigBuilder.build();
    client.getClientConfigManager().setNewConfig(rtConfigBuilder.build());
    return si;
  }
View Full Code Here

  }

  static Set<ServerInfo> createServerInfo(String serverName, String subscriptions) throws InvalidConfigException
  {
    Set<ServerInfo> serverInfo = new HashSet<ServerInfo>();
    ServerInfoBuilder sBuilder = new ServerInfoBuilder();
    sBuilder.setAddress(serverName + ":" + subscriptions);
    // sBuilder.setSources(subscriptions);
    serverInfo.add(sBuilder.build());
    return serverInfo;
  }
View Full Code Here

    }
  
    DatabusHttpClientImpl.StaticConfig clientConfig = configLoader.loadConfig(startupProps);

    // set up relay
    ServerInfoBuilder relayBuilder = clientConfig.getRuntime().getRelay("1");
    relayBuilder.setName("DefaultRelay");
    if (_relayHost != null)
    {
      relayBuilder.setHost(_relayHost);
    }
    if (_relayPort != null)
    {
      relayBuilder.setPort(Integer.parseInt(_relayPort));
    }
    relayBuilder.setSources(sourcesString.toString());

    // set up bootstrap
    if (_enableBootStrap)
    {
      ServerInfoBuilder bootstrapBuilder = clientConfig.getRuntime().getBootstrap().getService("2");
      bootstrapBuilder.setName("DefaultBootstrapServices");
      if (_bootstrapHost != null)
      {
        bootstrapBuilder.setHost(_bootstrapHost);
      }
      if (_bootstrapPort != null)
      {
        bootstrapBuilder.setPort(Integer.parseInt(_bootstrapPort));
      }
      bootstrapBuilder.setSources(sourcesString.toString());
    }

    // handler server side filtering, can either pass a config file or set from command line
    DbusKeyCompositeFilterConfig filterConfig = createServerSideFilterConfig(_filterConfFile, startupProps);
View Full Code Here

      }
    }

    public ServerInfoBuilder getRelay(String id)
    {
      ServerInfoBuilder relay = getRelays().get(id);
      if (null == relay)
      {
        relay = new ServerInfoBuilder();
        setRelay(id, relay);
      }

      return relay;
    }
View Full Code Here

  {
    ArrayList<ServerInfo> infos = new ArrayList<ServerInfo>((int)(map.size() * 1.3));
    for (Map.Entry<String, ServerInfoBuilder> entry : map.entrySet())
    {
      LOG.info("parseServerInfo: " + entry.toString());
      ServerInfoBuilder builder = entry.getValue();
      boolean added = infos.add(builder.build());
      LOG.info("added=" + added);
    }
    LOG.info("info size=" + infos.size());
    return infos;
  }
View Full Code Here

      _services.put(id, serverInfo);
    }

    public ServerInfoBuilder getService(String id)
    {
      ServerInfoBuilder bootstrapService = _services.get(id);
      if (null == bootstrapService)
      {
        bootstrapService = new ServerInfoBuilder();
        _services.put(id, bootstrapService);
      }

      return bootstrapService;
    }
View Full Code Here

    // For now, bootstrap buffer will use the same config as relay buffer.
    //clientConfigBuilder.getConnectionDefaults().
    DatabusHttpClientImpl.StaticConfig clientConfig = clientConfigBuilder.build();


    ServerInfoBuilder relayBuilder = clientConfig.getRuntime().getRelay("1");
    relayBuilder.setName("DefaultRelay");
    relayBuilder.setHost("localhost");
    relayBuilder.setPort(9000);
    relayBuilder.setSources(sourcesString.toString());

    ServerInfoBuilder bootstrapBuilder = clientConfig.getRuntime().getBootstrap().getService("2");
    bootstrapBuilder.setName("DefaultBootstrapServices");
    bootstrapBuilder.setHost("localhost");
    bootstrapBuilder.setPort(6060);
    bootstrapBuilder.setSources(sourcesString.toString());

    _dbusClient = new DatabusHttpClientImpl(clientConfig);
    _dbusClient.registerDatabusStreamListener(this, sources, null);
    _dbusClient.registerDatabusBootstrapListener(this, sources, null);
    // add pause processor
View Full Code Here

          throws InvalidConfigException
  {
    RuntimeConfigBuilder rtConfigBuilder =
        (RuntimeConfigBuilder)client.getClientConfigManager().getConfigBuilder();

    ServerInfoBuilder relayConfigBuilder = rtConfigBuilder.getRelay(Integer.toString(id));
    relayConfigBuilder.setName(name);
    relayConfigBuilder.setHost(addr.getHostName());
    relayConfigBuilder.setPort(addr.getPort());
    relayConfigBuilder.setSources(sources);
    ServerInfo si = relayConfigBuilder.build();
    client.getClientConfigManager().setNewConfig(rtConfigBuilder.build());
    return si;
  }
View Full Code Here

    }

    DatabusHttpClientImpl.StaticConfig clientConfig = configLoader.loadConfig(startupProps);

    // set up relay
    ServerInfoBuilder relayBuilder = clientConfig.getRuntime().getRelay("1");
    relayBuilder.setName("DefaultRelay");
    if (_relayHost != null)
    {
      relayBuilder.setHost(_relayHost);
    }
    if (_relayPort != null)
    {
      relayBuilder.setPort(Integer.parseInt(_relayPort));
    }
    relayBuilder.setSources(sourcesString.toString());

    // set up bootstrap
    if (_enableBootStrap)
    {
      ServerInfoBuilder bootstrapBuilder = clientConfig.getRuntime().getBootstrap().getService("2");
      bootstrapBuilder.setName("DefaultBootstrapServices");
      if (_bootstrapHost != null)
      {
        bootstrapBuilder.setHost(_bootstrapHost);
      }
      if (_bootstrapPort != null)
      {
        bootstrapBuilder.setPort(Integer.parseInt(_bootstrapPort));
      }
      bootstrapBuilder.setSources(sourcesString.toString());
    }

    // set up listeners
    DatabusHttpClientImpl client = new DatabusHttpClientImpl(clientConfig);
View Full Code Here

TOP

Related Classes of com.linkedin.databus.client.pub.ServerInfo.ServerInfoBuilder

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.