Package com.linkedin.databus.client.consumer

Examples of com.linkedin.databus.client.consumer.DatabusV2ConsumerRegistration


  static List<DatabusV2ConsumerRegistration> createDatabusV2ConsumerRegistration(
      DatabusCombinedConsumer consumer, List<String> sourcesStrList)
  {
    ArrayList<DatabusV2ConsumerRegistration> regs = new ArrayList<DatabusV2ConsumerRegistration>();
    // No server side filtering just as yet
    regs.add(new DatabusV2ConsumerRegistration(consumer, sourcesStrList,
        null));
    return regs;
  }
View Full Code Here


    for(SelectingDatabusCombinedConsumer sdcc: sdccListenersList)
    {
      dccListenersList.add(sdcc);
    }

    DatabusV2ConsumerRegistration consumerReg =
        new DatabusV2ConsumerRegistration(dccListenersList, sources, filterConfig);

    registerDatabusListener(consumerReg, _relayGroups, getRelayGroupStreamConsumers(),
                            DatabusSubscription.createSubscriptionList(sources));
  }
View Full Code Here

    for(SelectingDatabusCombinedConsumer sdcc: sdccListenersList)
    {
      dccListenersList.add(sdcc);
    }

    DatabusV2ConsumerRegistration consumerReg =
        new DatabusV2ConsumerRegistration(dccListenersList, sources, filter);

    registerDatabusListener(consumerReg, _relayGroups, getRelayGroupBootstrapConsumers(),
                            DatabusSubscription.createSubscriptionList(sources));
  }
View Full Code Here

    streamConsumers.addAll(_consumers);

    boolean canConsumerBootstrap = false;
    _streamConsumerRawRegistrations = new ArrayList<DatabusV2ConsumerRegistration>();
    _streamConsumerRawRegistrations.add(new DatabusV2ConsumerRegistration(streamConsumers, _sources, _filterConfig));

    for (DatabusCombinedConsumer c : _consumers)
    {
      if ( c.canBootstrap())
      {
        canConsumerBootstrap = true;
        bootstrapConsumers.add(c);
      }
    }

    boolean enableBootstrap = _client.getClientStaticConfig().getRuntime().getBootstrap().isEnabled();
    Set<ServerInfo> candidateBootstrapServers = new HashSet<ServerInfo>();

    if (enableBootstrap && canConsumerBootstrap)
    {
      if ( (null == bootstrapServers) || ( bootstrapServers.isEmpty()))
        throw new DatabusClientException("No configured bootstrap servers in the client to start");

      for (ServerInfo s : bootstrapServers)
      {
        if (canServe(s,_sources))
          candidateBootstrapServers.add(s);
      }

      if (candidateBootstrapServers.isEmpty())
        throw new DatabusClientException("No candidate bootstrap servers for source : " + _sources);

      _bootstrapConsumerRawRegistrations = new ArrayList<DatabusV2ConsumerRegistration>();;
      _bootstrapConsumerRawRegistrations.add(new DatabusV2ConsumerRegistration(bootstrapConsumers, _sources, _filterConfig));
    }

    // All validations done. Setup and start
    initializeStatsCollectors();
View Full Code Here

            IdNamePair sourcePair = new IdNamePair((long)i, "source" + i);
            sources.add(sourcePair.getName());
            sourcesMap.put(sourcePair.getId(), sourcePair);
        }

        DatabusV2ConsumerRegistration consumerReg =
                new DatabusV2ConsumerRegistration(sdccMockConsumer, sources, null);

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
View Full Code Here

            IdNamePair sourcePair = new IdNamePair((long)i, "source" + i);
            sources.add(sourcePair.getName());
            sourcesMap.put(sourcePair.getId(), sourcePair);
        }

        DatabusV2ConsumerRegistration consumerReg =
                new DatabusV2ConsumerRegistration(mockConsumer, sources, null);

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
View Full Code Here

            IdNamePair sourcePair = new IdNamePair((long)i, "source" + i);
            sources.add(sourcePair.getName());
            sourcesMap.put(sourcePair.getId(), sourcePair);
        }

        DatabusV2ConsumerRegistration consumerReg =
                new DatabusV2ConsumerRegistration(sdccMockConsumer, sources, null);

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
View Full Code Here

            IdNamePair sourcePair = new IdNamePair((long)i, "source" + i);
            sources.add(sourcePair.getName());
            sourcesMap.put(sourcePair.getId(), sourcePair);
        }

        DatabusV2ConsumerRegistration consumerReg =
                new DatabusV2ConsumerRegistration(sdccMockConsumer, sources, null);

        DatabusV2ConsumerRegistration consumer2Reg =
                new DatabusV2ConsumerRegistration(sdccMockConsumer2, sources, null);

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg, consumer2Reg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
View Full Code Here

            IdNamePair sourcePair = new IdNamePair((long)i, "source" + i);
            sources.add(sourcePair.getName());
            sourcesMap.put(sourcePair.getId(), sourcePair);
        }

        DatabusV2ConsumerRegistration consumerReg =
                new DatabusV2ConsumerRegistration(Arrays.asList(sdccMockConsumer, sdccMockConsumer2),
                        sources, null);

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg);
        MultiConsumerCallback callback =
View Full Code Here

            IdNamePair sourcePair = new IdNamePair((long)i, "source" + i);
            sources.add(sourcePair.getName());
            sourcesMap.put(sourcePair.getId(), sourcePair);
        }

        DatabusV2ConsumerRegistration consumerReg =
                new DatabusV2ConsumerRegistration(sdccMockConsumer, sources, null);

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
View Full Code Here

TOP

Related Classes of com.linkedin.databus.client.consumer.DatabusV2ConsumerRegistration

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.