Package com.linkedin.databus.client.pub

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


   * @see com.linkedin.databus2.tools.dtail.GenericRecordDtailPrinter#printGenericRecord(org.apache.avro.generic.GenericRecord)
   */
  @Override
  public ConsumerCallbackResult printGenericRecord(GenericRecord r)
  {
    ConsumerCallbackResult result = ConsumerCallbackResult.SUCCESS;
    try
    {
      //eventDecoder.dumpEventValueInJSON(e, _out);
      JsonEncoder jsonEnc = _jsonEncoders.get(r.getSchema());
      if (null == jsonEnc)
View Full Code Here


  protected ConsumerCallbackResult processEvent(DbusEventInternalReadable e, DbusEventDecoder eventDecoder)
  {
    if (_done) return ConsumerCallbackResult.SUCCESS;

    ConsumerCallbackResult result = printEvent(e, eventDecoder);
    if (ConsumerCallbackResult.isSuccess(result))
    {
      _endTs = System.currentTimeMillis();
      ++ _eventsNum;
      _eventBytes += e.size();
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
    {
      _out.write(r.toString().getBytes(Charset.defaultCharset()));
      _out.write('\n');
    }
View Full Code Here


  @Override
  public ConsumerCallbackResult onStopConsumption()
  {
    ConsumerCallbackResult result = flushStreamEvents();
    return result;
  }
View Full Code Here

  }

  @Override
  public ConsumerCallbackResult onEndDataEventSequence(SCN endScn)
  {
    ConsumerCallbackResult result = ConsumerCallbackResult.SUCCESS;
    switch (_staticConfig.getBatchingLevel())
    {
      case SOURCES:
      case WINDOWS: result = flushStreamEvents(); break;
      case FULL: result = ConsumerCallbackResult.SUCCESS; break;
View Full Code Here

  }

  @Override
  public ConsumerCallbackResult onRollback(SCN rollbackScn)
  {
    ConsumerCallbackResult result = flushStreamEvents();
    return result;
  }
View Full Code Here

  }

  @Override
  public ConsumerCallbackResult onEndSource(String source, Schema sourceSchema)
  {
    ConsumerCallbackResult result = ConsumerCallbackResult.SUCCESS;
    switch (_staticConfig.getBatchingLevel())
    {
      case SOURCES:result = flushStreamEvents(); break;
      case WINDOWS:
      case FULL: result = ConsumerCallbackResult.SUCCESS; break;
View Full Code Here

  }

  @Override
  public ConsumerCallbackResult onCheckpoint(SCN checkpointScn)
  {
    ConsumerCallbackResult result = flushStreamEvents();
    return result;
  }
View Full Code Here

  }

  @Override
  public ConsumerCallbackResult onStopBootstrap()
  {
    ConsumerCallbackResult result = flushBootstrapEvents();
    return result;
  }
View Full Code Here

  }

  @Override
  public ConsumerCallbackResult onEndBootstrapSequence(SCN endScn)
  {
    ConsumerCallbackResult result = ConsumerCallbackResult.SUCCESS;
    switch (_staticConfig.getBatchingLevel())
    {
      case SOURCES:
      case WINDOWS: result = flushBootstrapEvents(); break;
      case FULL: result = ConsumerCallbackResult.SUCCESS; break;
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.