Package com.linkedin.databus.client.consumer

Examples of com.linkedin.databus.client.consumer.MultiConsumerCallback$TimestampedFuture


      {
        throw new DatabusRuntimeException(e)// alternatively:  declare InvalidConfigException, let it go
      }
    }

    MultiConsumerCallback relayAsyncCallback =
        new MultiConsumerCallback((null != _relayRegistrations) ?
                                      _relayRegistrations :
                                      new ArrayList<DatabusV2ConsumerRegistration>(),
                                  _consumerCallbackExecutor,
                                  connConfig.getConsumerTimeBudgetMs(),
                                  new StreamConsumerCallbackFactory(_relayConsumerStats,
                                                                    _unifiedClientStats),
                                  _relayConsumerStats,
                                  _unifiedClientStats,
                                  loggingConsumer,
                                  _log);

    MultiConsumerCallback bootstrapAsyncCallback =
        new MultiConsumerCallback((null != _bootstrapRegistrations) ?
                                      _bootstrapRegistrations :
                                      new ArrayList<DatabusV2ConsumerRegistration>(),
                                  _consumerCallbackExecutor,
                                  connConfig.getBstConsumerTimeBudgetMs(),
                                  new BootstrapConsumerCallbackFactory(_bootstrapConsumerStats,
View Full Code Here


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

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
                        allRegistrations,
                        Executors.newSingleThreadExecutor(),
                        1000,
                        new StreamConsumerCallbackFactory(null, null),
                        null,
                        null,
                        null,
                        null);
        callback.setSourceMap(sourcesMap);

        List<DatabusSubscription> subs = DatabusSubscription.createSubscriptionList(sources);
        RelayDispatcher dispatcher =
                new RelayDispatcher("dispatcher", _genericRelayConnStaticConfig, subs,
                        new InMemoryPersistenceProvider(),
View Full Code Here

        long consumerTimeBudgetMs = 60*1000;
        DatabusV2ConsumerRegistration consumerReg = new DatabusV2ConsumerRegistration(tConsumer, sources, null);
        List<DatabusV2ConsumerRegistration> allRegistrations =  Arrays.asList(consumerReg);
        //Single threaded execution of consumer
        MultiConsumerCallback mConsumer = new MultiConsumerCallback(allRegistrations,Executors.newFixedThreadPool(1),
                consumerTimeBudgetMs, new StreamConsumerCallbackFactory(null, null), null, null, null, null);

        /* Generate events **/
        Vector<DbusEvent> srcTestEvents = new Vector<DbusEvent>();
        Vector<Short> srcIdList = new Vector<Short> ();
View Full Code Here

      long consumerTimeBudgetMs = 60*1000;
      DatabusV2ConsumerRegistration consumerReg = new DatabusV2ConsumerRegistration(tConsumer, sources, null);
      List<DatabusV2ConsumerRegistration> allRegistrations =  Arrays.asList(consumerReg);
      //Single threaded execution of consumer
      MultiConsumerCallback mConsumer = new MultiConsumerCallback(allRegistrations,Executors.newFixedThreadPool(1),
              consumerTimeBudgetMs,new StreamConsumerCallbackFactory(null,null),null,null, null, null);



      /* Generate events **/
 
View Full Code Here

          new DatabusV2ConsumerRegistration(sdccMockConsumer, sources, null);

      List<DatabusV2ConsumerRegistration> allRegistrations = Arrays.asList(consumerReg);
      final ConsumerCallbackStats callbackStats = new ConsumerCallbackStats(0, "test", "test", true, false, null);
      final UnifiedClientStats unifiedStats = new UnifiedClientStats(0, "test", "test.unified");
      MultiConsumerCallback callback =
          new MultiConsumerCallback(allRegistrations,
                                    Executors.newFixedThreadPool(2),
                                    100, // 100 ms budget
                                    new StreamConsumerCallbackFactory(callbackStats, unifiedStats),
                                    callbackStats,
                                    unifiedStats,
                                    null,
                                    null);
      callback.setSourceMap(sourcesMap);
      List<DatabusSubscription> subs = DatabusSubscription.createSubscriptionList(sources);
      final RelayDispatcher dispatcher =
          new RelayDispatcher("dispatcher", _genericRelayConnStaticConfig, subs,
                              new InMemoryPersistenceProvider(),
                              destEventsBuf, callback, null,null,null,null,null);
View Full Code Here

              new DatabusV2ConsumerRegistration(sdccMockConsumer, sources, null);

      List<DatabusV2ConsumerRegistration> allRegistrations = Arrays.asList(consumerReg);
      final ConsumerCallbackStats callbackStats = new ConsumerCallbackStats(0, "test", "test", true, false, null);
      final UnifiedClientStats unifiedStats = new UnifiedClientStats(0, "test", "test.unified");
      MultiConsumerCallback callback =
          new MultiConsumerCallback(allRegistrations,
                                    Executors.newFixedThreadPool(2),
                                    1000,
                                    new StreamConsumerCallbackFactory(callbackStats, unifiedStats),
                                    callbackStats,
                                    unifiedStats,
                                    null,
                                    null);
      callback.setSourceMap(sourcesMap);


      List<DatabusSubscription> subs = DatabusSubscription.createSubscriptionList(sources);
      final RelayDispatcher dispatcher =
              new RelayDispatcher("dispatcher", _genericRelayConnStaticConfig, subs,
View Full Code Here

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

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
                        allRegistrations,
                        Executors.newSingleThreadExecutor(),
                        1000,
                        new StreamConsumerCallbackFactory(null, null),
                        null,
                        null,
                        null,
                        null);
        callback.setSourceMap(sourcesMap);

        List<DatabusSubscription> subs = DatabusSubscription.createSubscriptionList(sources);
        RelayDispatcher dispatcher =
                new RelayDispatcher("dispatcher", _genericRelayConnStaticConfig, subs,
                        new InMemoryPersistenceProvider(),
View Full Code Here

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

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
                        allRegistrations,
                        Executors.newSingleThreadExecutor(),
                        1000,
                        new StreamConsumerCallbackFactory(null, null),
                        null,
                        null,
                        null,
                        null);
        callback.setSourceMap(sourcesMap);

        DatabusSourcesConnection.Config connCfgBuilder = new DatabusSourcesConnection.Config();
        connCfgBuilder.setConsumerParallelism(1);
        connCfgBuilder.setEventBuffer(_generic100KBufferConfig);
        connCfgBuilder.setFreeBufferThreshold(10000);
View Full Code Here

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

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
                        allRegistrations,
                        Executors.newSingleThreadExecutor(),
                        1000,
                        new StreamConsumerCallbackFactory(null, null),
                        null,
                        null,
                        null,
                        null);
        callback.setSourceMap(sourcesMap);

        List<DatabusSubscription> subs = DatabusSubscription.createSubscriptionList(sources);
        RelayDispatcher dispatcher =
                new RelayDispatcher("dispatcher", _genericRelayConnStaticConfig, subs,
                        new InMemoryPersistenceProvider(),
View Full Code Here

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

        List<DatabusV2ConsumerRegistration> allRegistrations =
                Arrays.asList(consumerReg, consumer2Reg);
        MultiConsumerCallback callback =
                new MultiConsumerCallback(
                        allRegistrations,
                        Executors.newFixedThreadPool(2),
                        1000,
                        new StreamConsumerCallbackFactory(null, null),
                        null,
                        null,
                        null,
                        null);
        callback.setSourceMap(sourcesMap);

        List<DatabusSubscription> subs = DatabusSubscription.createSubscriptionList(sources);
        final RelayDispatcher dispatcher =
                new RelayDispatcher("dispatcher", _genericRelayConnStaticConfig, subs,
                        new InMemoryPersistenceProvider(),
View Full Code Here

TOP

Related Classes of com.linkedin.databus.client.consumer.MultiConsumerCallback$TimestampedFuture

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.