com.gilt.gfc.aws.kinesis.client

KCLWorkerRunner

case class KCLWorkerRunner(config: KinesisClientLibConfiguration, checkpointInterval: FiniteDuration = ..., numRetries: Int = 3, initialize: (String) ⇒ Unit = ((x$1: String) => ()), shutdown: (String, IRecordProcessorCheckpointer, ShutdownReason) ⇒ Unit = ...) extends Loggable with Product with Serializable

A helper class to merge required/optional/default parameters and run a KCL Worker.

config

KCL config, @see KCLConfiguration for some useful defaults.

checkpointInterval

how often to save checkpoint to dynamodb

numRetries

how many times to retry operation on exception before giving up

initialize

(ShardId) => Unit : additional code to execute when handler is initialized

shutdown

(ShardId, Checkpointer, ShutdownReason) => Unit : additional code to execute on shutdown

Linear Supertypes
Serializable, Serializable, Product, Equals, Loggable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. KCLWorkerRunner
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Loggable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KCLWorkerRunner(config: KinesisClientLibConfiguration, checkpointInterval: FiniteDuration = ..., numRetries: Int = 3, initialize: (String) ⇒ Unit = ((x$1: String) => ()), shutdown: (String, IRecordProcessorCheckpointer, ShutdownReason) ⇒ Unit = ...)

    config

    KCL config, @see KCLConfiguration for some useful defaults.

    checkpointInterval

    how often to save checkpoint to dynamodb

    numRetries

    how many times to retry operation on exception before giving up

    initialize

    (ShardId) => Unit : additional code to execute when handler is initialized

    shutdown

    (ShardId, Checkpointer, ShutdownReason) => Unit : additional code to execute on shutdown

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val checkpointInterval: FiniteDuration

    how often to save checkpoint to dynamodb

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val config: KinesisClientLibConfiguration

    KCL config, @see KCLConfiguration for some useful defaults.

  10. def debug(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  11. def debug(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def error(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  14. def error(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  15. def error(ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  16. def fatal(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  17. def fatal(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  18. def fatal(ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  21. def info(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  22. def info(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  23. val initialize: (String) ⇒ Unit

    (ShardId) => Unit : additional code to execute when handler is initialized

  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  28. val numRetries: Int

    how many times to retry operation on exception before giving up

  29. def runAsyncSingleRecordProcessor[A](callbackTimeout: FiniteDuration)(processRecord: (A) ⇒ Future[Unit])(implicit executor: ExecutionContext, evReader: KinesisRecordReader[A]): Unit

    Run KCL worker with the given asynchronous callback.

    Run KCL worker with the given asynchronous callback. Batch will be processed in parallel. You can control the level of parallelism by configuring provided execution context parameter.

    callbackTimeout

    how long to wait for async call results

    processRecord

    (Record) => Future[Unit] : async record handler

    executor

    where to execute record processing functions

    evReader

    evidence that A has implementation of KinesisRecordReader implicitly available in scope

  30. def runBatchProcessor[A](processRecords: (String, Seq[A], IRecordProcessorCheckpointer) ⇒ Unit)(implicit evReader: KinesisRecordReader[A]): Unit

    Run KCL worker with the given callback.

    Run KCL worker with the given callback.

    processRecords

    (ShardId, Records, Checkpointer) => Unit : Kinesis record handler

    evReader

    evidence that A has implementation of KinesisRecordReader implicitly available in scope

  31. def runSingleRecordProcessor[A](processRecord: (String, A, IRecordProcessorCheckpointer) ⇒ Unit)(implicit evReader: KinesisRecordReader[A]): Unit

    Run KCL worker with the given callback.

    Run KCL worker with the given callback. Simple single-threaded execution, access to shard ID and checkpointer.

    processRecord

    (ShardId, Record, Checkpointer) => Unit : Kinesis record handler

    evReader

    evidence that A has implementation of KinesisRecordReader implicitly available in scope

  32. val shutdown: (String, IRecordProcessorCheckpointer, ShutdownReason) ⇒ Unit

    (ShardId, Checkpointer, ShutdownReason) => Unit : additional code to execute on shutdown

  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. def trace(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  35. def trace(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  36. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def warn(message: ⇒ String, ex: Throwable): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  40. def warn(message: ⇒ String): Unit

    Attributes
    protected
    Definition Classes
    Loggable
  41. def withCheckpointInterval(cpi: FiniteDuration): KCLWorkerRunner

    Override default checkpointInterval.

  42. def withInitialize(init: (String) ⇒ Unit): KCLWorkerRunner

    Override default (NOOP) init function.

  43. def withNumRetries(n: Int): KCLWorkerRunner

    Override default num retries.

  44. def withShutdown(sd: (String, IRecordProcessorCheckpointer, ShutdownReason) ⇒ Unit): KCLWorkerRunner

    Override default (NOOP) shutdown function.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Loggable

Inherited from AnyRef

Inherited from Any

Ungrouped