Package com.linkedin.databus.client.pub

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


  }

  @Override
  public ConsumerCallbackResult onBootstrapRollback(SCN rollbackScn)
  {
    ConsumerCallbackResult result = super.onBootstrapRollback(rollbackScn);
    return doRollback(rollbackScn, result, true);
  }
View Full Code Here


  }

  @Override
  public ConsumerCallbackResult onStartBootstrap()
  {
    ConsumerCallbackResult result = super.onStartBootstrap();
    return doStartConsumption(result, true);
  }
View Full Code Here

  }

  @Override
  public ConsumerCallbackResult onStopBootstrap()
  {
    ConsumerCallbackResult result = super.onStopBootstrap();
    return doStopConsumption(result, true);
  }
View Full Code Here

  }

  @Override
  public ConsumerCallbackResult onError(Throwable err)
  {
    ConsumerCallbackResult result = super.onError(err);
    return doError(err, result, false);
  }
View Full Code Here

  }

  @Override
  public ConsumerCallbackResult onBootstrapError(Throwable err)
  {
    ConsumerCallbackResult result = super.onBootstrapError(err);
    return doError(err, result, true);
  }
View Full Code Here

   * @see com.linkedin.databus2.tools.dtail.GenericRecordDtailPrinter#printGenericRecord(org.apache.avro.generic.GenericRecord)
   */
  @Override
  public ConsumerCallbackResult printGenericRecord(GenericRecord r)
  {
    ConsumerCallbackResult result = ConsumerCallbackResult.SUCCESS;
    try
    {

      BinaryEncoder binEnc = _binEncoders.get(r.getSchema());
      if (null == binEnc)
View Full Code Here

            unifiedStatsCollector,
            null,
            null);
    callback.setSourceMap(sourcesMap);

    ConsumerCallbackResult startConsumptionRes = callback.onStartConsumption();
    Assert.assertTrue(ConsumerCallbackResult.isFailure(startConsumptionRes),
                      "startConsumption() failed");
    ConsumerCallbackResult startWindowRes = callback.onStartDataEventSequence(null);
    Assert.assertTrue(ConsumerCallbackResult.isFailure(startWindowRes),
                      "startDataEventSequence() failed");
    ConsumerCallbackResult startSourceRes = callback.onStartSource("source1", null);
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(startSourceRes),
                      "startSources(source1) succeeded");
    ConsumerCallbackResult event1Res = callback.onDataEvent(event1, null);
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(event1Res),
                      "onDataEvent(1) succeeded");
    ConsumerCallbackResult event2Res = callback.onDataEvent(event2, null);
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(event2Res),
                       "onDataEvent(2) queued up");
    ConsumerCallbackResult event3Res = callback.onDataEvent(event1, null);
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(event3Res),
                      "onDataEvent(1) queued up");
    ConsumerCallbackResult endSourceRes = callback.onEndSource("source1", null);
    Assert.assertTrue(ConsumerCallbackResult.isFailure(endSourceRes),
                       "onEndSource fails because of timeout in onDataEvent(2)");

    EasyMock.reset(mockConsumer1);
    EasyMock.makeThreadSafe(mockConsumer1, true);
View Full Code Here

            consumerStatsCollector,
            unifiedStatsCollector,
            3);
    callback.setSourceMap(sourcesMap);

    ConsumerCallbackResult startConsumptionRes = callback.onStartConsumption();
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(startConsumptionRes),
                      "startConsumption() succeeded: " + startConsumptionRes);
    ConsumerCallbackResult startWindowRes = callback.onStartDataEventSequence(null);
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(startWindowRes),
                      "startDataEventSequence() succeeded");
    ConsumerCallbackResult startSourceRes = callback.onStartSource("source1", null);
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(startSourceRes),
                      "startSources(source1) succeeded");
    ConsumerCallbackResult event1Res = callback.onDataEvent(event1, null);
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(event1Res),
                      "onDataEvent(1) succeeded");
    ConsumerCallbackResult event2Res = callback.onDataEvent(event2, null);
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(event2Res),
                       "onDataEvent(2) queued up");
    ConsumerCallbackResult event3Res = callback.onDataEvent(event1, null);
    Assert.assertTrue(ConsumerCallbackResult.isSuccess(event3Res),
                      "onDataEvent(1) queued up");
    ConsumerCallbackResult endSourceRes = callback.onEndSource("source1", null);
    Assert.assertTrue(ConsumerCallbackResult.isFailure(endSourceRes),
                       "onEndSource fails because of timeout in onDataEvent(2)");

    EasyMock.reset(mockConsumer1);
    log.info("test2ConsumerTimeout: end");
View Full Code Here

    if (null != curState.getLastSuccessfulIterator())
    {
      curState.getLastSuccessfulIterator().close();
    }

    ConsumerCallbackResult stopSuccess = ConsumerCallbackResult.ERROR;
    try
    {
      stopSuccess = _asyncCallback.onStopConsumption();
    }
    catch (RuntimeException e)
View Full Code Here

    {
      Checkpoint lastCp = curState.getLastSuccessfulCheckpoint();

      if ((null != lastCp) || (!regressItr))
      {
        ConsumerCallbackResult callbackResult = ConsumerCallbackResult.ERROR;
        try
        {
          _log.info("Rolling back to SCN : " + rollbackScn);
          callbackResult = getAsyncCallback().onRollback(rollbackScn);
        }
View Full Code Here

TOP

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

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.