Package com.linkedin.databus.client.pub

Examples of com.linkedin.databus.client.pub.DatabusCombinedConsumer


        DatabusStreamConsumer mockConsumer =
                new EventCountingConsumer(new StateVerifyingStreamConsumer(null), keyCounts, srcidCounts);
        DatabusStreamConsumer mockConsumer2 =
                new EventCountingConsumer(new StateVerifyingStreamConsumer(null), keyCounts, srcidCounts);

        DatabusCombinedConsumer sdccMockConsumer = new SelectingDatabusCombinedConsumer(mockConsumer);
        DatabusCombinedConsumer sdccMockConsumer2 = new SelectingDatabusCombinedConsumer(mockConsumer2);

        List<String> sources = new ArrayList<String>();
        Map<Long, IdNamePair> sourcesMap = new HashMap<Long, IdNamePair>();
        for (int i = 1; i <= 3; ++i)
        {
View Full Code Here


      final Logger log = Logger.getLogger("TestGenericDispatcher.testLargeWindowCheckpointFrequency");
      log.info("start");
            /* Consumer creation */
            int timeTakenForEventInMs = 1;
            DatabusStreamConsumer tConsumer = new TimeoutTestConsumer(timeTakenForEventInMs);
            DatabusCombinedConsumer sdccTConsumer = new SelectingDatabusCombinedConsumer(tConsumer);
            HashMap<Long, List<RegisterResponseEntry>> schemaMap =
                    new HashMap<Long, List<RegisterResponseEntry>>();

            short srcId=1;
            List<RegisterResponseEntry> l1 = new ArrayList<RegisterResponseEntry>();
View Full Code Here

    EasyMock.makeThreadSafe(mockConsumer2, true);
    DatabusStreamConsumer mockConsumer3 = EasyMock.createStrictMock("consumer3",
                                                                    DatabusStreamConsumer.class);
    EasyMock.makeThreadSafe(mockConsumer3, true);

    DatabusCombinedConsumer sdccMockConsumer1 = new SelectingDatabusCombinedConsumer(mockConsumer1);
    DatabusCombinedConsumer sdccMockConsumer2 = new SelectingDatabusCombinedConsumer(mockConsumer2);
    DatabusCombinedConsumer sdccMockConsumer3 = new SelectingDatabusCombinedConsumer(mockConsumer3);

    List<String> sources = new ArrayList<String>();
    Map<Long, IdNamePair> sourcesMap = new HashMap<Long, IdNamePair>();
    for (int i = 1; i <= 3; ++i)
    {
View Full Code Here

    EasyMock.makeThreadSafe(mockConsumer2, true);
    DatabusStreamConsumer mockConsumer3 = EasyMock.createStrictMock("consumer3",
                                                                    DatabusStreamConsumer.class);
    EasyMock.makeThreadSafe(mockConsumer3, true);

    DatabusCombinedConsumer sdccMockConsumer1 = new SelectingDatabusCombinedConsumer(mockConsumer1);
    DatabusCombinedConsumer sdccMockConsumer2 = new SelectingDatabusCombinedConsumer(mockConsumer2);
    DatabusCombinedConsumer sdccMockConsumer3 = new SelectingDatabusCombinedConsumer(mockConsumer3);

    List<String> sources = new ArrayList<String>();
    Map<Long, IdNamePair> sourcesMap = new HashMap<Long, IdNamePair>();
    for (int i = 1; i <= 3; ++i)
    {
View Full Code Here

{

  @Test
  public void testSingleConsumer() throws Exception
  {
    DatabusCombinedConsumer logConsumer = new LoggingConsumer();
    List<String> sources = new ArrayList<String>();
    ConsumerRegistration consumerReg = new ConsumerRegistration(logConsumer, sources, null);

    Assert.assertEquals(logConsumer, consumerReg.getConsumer());
    return;
View Full Code Here

  }

  @Test
  public void testMultipleConsumers() throws Exception
  {
    DatabusCombinedConsumer logConsumer1 = new LoggingConsumer();
    DatabusCombinedConsumer logConsumer2 = new LoggingConsumer();
    List<DatabusCombinedConsumer> lcs = new ArrayList<DatabusCombinedConsumer>();
    lcs.add(logConsumer1);
    lcs.add(logConsumer2);

    List<String> sources = new ArrayList<String>();
    ConsumerRegistration consumerReg = new ConsumerRegistration(lcs, sources, null);

    DatabusStreamConsumer cons = consumerReg.getConsumer();
    boolean condition = logConsumer1.equals(cons) || logConsumer2.equals(cons);
    Assert.assertEquals(condition, true);
    return;
  }
View Full Code Here

TOP

Related Classes of com.linkedin.databus.client.pub.DatabusCombinedConsumer

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.