Package com.linkedin.databus.client.pub

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


  }

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


  @Override
  public ConsumerCallbackResult onBootstrapEvent(DbusEvent e,
                                                 DbusEventDecoder eventDecoder)
  {
    T eventObj = eventDecoder.getTypedValue(e, (T)null, _payloadClass);
    ConsumerCallbackResult result = addBootstrapEvent(eventObj);
    return result;
  }
View Full Code Here

  }

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

  }

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

  @Override
  public ConsumerCallbackResult onDataEvent(DbusEvent e, DbusEventDecoder eventDecoder)
  {
    T eventObj = eventDecoder.getTypedValue(e, (T)null, _payloadClass);
    ConsumerCallbackResult result = addDataEvent(eventObj);
    return result;
  }
View Full Code Here

    return result;
  }

  private ConsumerCallbackResult addDataEvent(T eventObj)
  {
    ConsumerCallbackResult result = ConsumerCallbackResult.SUCCESS;
    _streamEvents.add(eventObj);
    if (_streamEvents.size() >= _staticConfig.getStreamBatchSize())
    {
      result = flushStreamEvents();
    }
View Full Code Here

    return result;
  }

  private ConsumerCallbackResult addBootstrapEvent(T eventObj)
  {
    ConsumerCallbackResult result = ConsumerCallbackResult.SUCCESS;
    _bootstrapEvents.add(eventObj);
    if (_bootstrapEvents.size() >= _staticConfig.getBootstrapBatchSize())
    {
      result = flushBootstrapEvents();
    }
View Full Code Here

    return result;
  }

  private ConsumerCallbackResult flushStreamEvents()
  {
    ConsumerCallbackResult result;
    if (0 == _streamEvents.size()) result = ConsumerCallbackResult.SUCCESS;
    else
    {
      result = onDataEventsBatch(_streamEvents);
      _streamEvents.clear();
View Full Code Here

    return result;
  }

  private ConsumerCallbackResult flushBootstrapEvents()
  {
    ConsumerCallbackResult result;
    if (0 == _bootstrapEvents.size()) result = ConsumerCallbackResult.SUCCESS;
    else
    {
      result = onBootstrapEventsBatch(_bootstrapEvents);
      _bootstrapEvents.clear();
View Full Code Here

  }

  @Override
  protected ConsumerCallbackResult doCall() throws Exception
  {
     ConsumerCallbackResult res = _consumer.onBootstrapCheckpoint(_scn);
     return ConsumerCallbackResult.isFailure(res) ? ConsumerCallbackResult.SKIP_CHECKPOINT : res;
  }
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.