Class

com.sksamuel.elastic4s.streams

SubscriberConfig

Related Doc: package streams

Permalink

case class SubscriberConfig(batchSize: Int = 100, concurrentRequests: Int = 5, refreshAfterOp: Boolean = false, listener: ResponseListener = ResponseListener.noop, completionFn: () ⇒ Unit = () => (), successFn: () ⇒ Unit = () => (), errorFn: (Throwable) ⇒ Unit = e => (), failureWait: FiniteDuration = 2.seconds, maxAttempts: Int = 5, flushInterval: Option[FiniteDuration] = None, flushAfter: Option[FiniteDuration] = None) extends Product with Serializable

batchSize

the number of elements to group together per batch aside from the last batch

concurrentRequests

the number of concurrent batch operations

refreshAfterOp

if the index should be refreshed after each bulk operation

listener

a listener which is notified on each acknowledge batch item

completionFn

a function which is invoked when all sent requests have been acknowledged and the publisher has completed Note: this function is executed regardless of whether there was an error or not, that is, this function is always invoked regardless of the state

successFn

a function will is only invoked when all operations have completed successfully

errorFn

a function which is invoked after there is an error

failureWait

the timeout before re-trying failed requests. Usually a failed request is elasticsearch's way of indicating backpressure, so this parameter determines how long to wait between requests.

maxAttempts

the max number of times to try a request. If it fails too many times it probably isn't back pressure but an error with the document.

flushInterval

used to schedule periodic bulk indexing. This can be set to avoid waiting for a complete batch for a long period of time. It also is used if the publisher will never complete. This ensures that all elements are indexed, even if the last batch size is lower than batch size.

flushAfter

used to schedule an index if no document has been received within the given duration. Once an index is performed (either by this flush value or because docs arrived in time) the flush after schedule is reset.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SubscriberConfig
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SubscriberConfig(batchSize: Int = 100, concurrentRequests: Int = 5, refreshAfterOp: Boolean = false, listener: ResponseListener = ResponseListener.noop, completionFn: () ⇒ Unit = () => (), successFn: () ⇒ Unit = () => (), errorFn: (Throwable) ⇒ Unit = e => (), failureWait: FiniteDuration = 2.seconds, maxAttempts: Int = 5, flushInterval: Option[FiniteDuration] = None, flushAfter: Option[FiniteDuration] = None)

    Permalink

    batchSize

    the number of elements to group together per batch aside from the last batch

    concurrentRequests

    the number of concurrent batch operations

    refreshAfterOp

    if the index should be refreshed after each bulk operation

    listener

    a listener which is notified on each acknowledge batch item

    completionFn

    a function which is invoked when all sent requests have been acknowledged and the publisher has completed Note: this function is executed regardless of whether there was an error or not, that is, this function is always invoked regardless of the state

    successFn

    a function will is only invoked when all operations have completed successfully

    errorFn

    a function which is invoked after there is an error

    failureWait

    the timeout before re-trying failed requests. Usually a failed request is elasticsearch's way of indicating backpressure, so this parameter determines how long to wait between requests.

    maxAttempts

    the max number of times to try a request. If it fails too many times it probably isn't back pressure but an error with the document.

    flushInterval

    used to schedule periodic bulk indexing. This can be set to avoid waiting for a complete batch for a long period of time. It also is used if the publisher will never complete. This ensures that all elements are indexed, even if the last batch size is lower than batch size.

    flushAfter

    used to schedule an index if no document has been received within the given duration. Once an index is performed (either by this flush value or because docs arrived in time) the flush after schedule is reset.

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val batchSize: Int

    Permalink

    the number of elements to group together per batch aside from the last batch

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val completionFn: () ⇒ Unit

    Permalink

    a function which is invoked when all sent requests have been acknowledged and the publisher has completed Note: this function is executed regardless of whether there was an error or not, that is, this function is always invoked regardless of the state

  8. val concurrentRequests: Int

    Permalink

    the number of concurrent batch operations

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. val errorFn: (Throwable) ⇒ Unit

    Permalink

    a function which is invoked after there is an error

  11. val failureWait: FiniteDuration

    Permalink

    the timeout before re-trying failed requests.

    the timeout before re-trying failed requests. Usually a failed request is elasticsearch's way of indicating backpressure, so this parameter determines how long to wait between requests.

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. val flushAfter: Option[FiniteDuration]

    Permalink

    used to schedule an index if no document has been received within the given duration.

    used to schedule an index if no document has been received within the given duration. Once an index is performed (either by this flush value or because docs arrived in time) the flush after schedule is reset.

  14. val flushInterval: Option[FiniteDuration]

    Permalink

    used to schedule periodic bulk indexing.

    used to schedule periodic bulk indexing. This can be set to avoid waiting for a complete batch for a long period of time. It also is used if the publisher will never complete. This ensures that all elements are indexed, even if the last batch size is lower than batch size.

  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. val listener: ResponseListener

    Permalink

    a listener which is notified on each acknowledge batch item

  18. val maxAttempts: Int

    Permalink

    the max number of times to try a request.

    the max number of times to try a request. If it fails too many times it probably isn't back pressure but an error with the document.

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. val refreshAfterOp: Boolean

    Permalink

    if the index should be refreshed after each bulk operation

  23. val successFn: () ⇒ Unit

    Permalink

    a function will is only invoked when all operations have completed successfully

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

    Permalink
    Definition Classes
    AnyRef
  25. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. def withTypedListener[T](typedListener: TypedResponseListener[T]): TypedSubscriberConfig[T]

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped