Package

com.sksamuel.elastic4s

streams

Permalink

package streams

Visibility
  1. Public
  2. All

Type Members

  1. class BulkActor[T] extends Actor

    Permalink
  2. class BulkIndexingSubscriber[T] extends Subscriber[T]

    Permalink

    An implementation of the reactive API Subscriber.

    An implementation of the reactive API Subscriber. This subscriber will bulk index received elements. The bulk nature means that the elasticsearch index operations are performed as a bulk call, the size of which are controlled by the batchSize param.

    The received elements must be converted into an elastic4s bulk compatible definition, such as index or delete. This is done by the RequestBuilder.

    T

    the type of element provided by the publisher this subscriber will subscribe with

  3. class PublishActor extends Actor with Stash

    Permalink
  4. trait RequestBuilder[T] extends AnyRef

    Permalink

    An implementation of this typeclass must provide a bulk compatible request for the given instance of T.

    An implementation of this typeclass must provide a bulk compatible request for the given instance of T.

    T

    the type of elements this provider supports

  5. trait ResponseListener extends AnyRef

    Permalink

    Notified on each acknowledgement

  6. class ScrollPublisher extends Publisher[RichSearchHit]

    Permalink

    An implementation of the reactive API Publisher, that publishes documents using an elasticsearch scroll cursor.

    An implementation of the reactive API Publisher, that publishes documents using an elasticsearch scroll cursor. The initial query must be provided to the publisher, and there are helpers to create a query for all documents in an index (and type).

  7. class ScrollSubscription extends Subscription

    Permalink
  8. 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

    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.

  9. trait TypedResponseListener[-T] extends AnyRef

    Permalink
  10. case class TypedSubscriberConfig[T](baseConfig: SubscriberConfig, typedListener: TypedResponseListener[T] = TypedResponseListener.noop) extends Product with Serializable

    Permalink

Ungrouped