Class

io.ino.solrs.FastestServerLB

Builder

Related Doc: package FastestServerLB

Permalink

case class Builder(solrServers: SolrServers, collectionAndTestQuery: (SolrServer) ⇒ (String, SolrQuery), minDelay: Duration = 100 millis, maxDelay: Duration = 10 seconds, initialTestRuns: Int = 10, filterFastServers: (Long) ⇒ ((SolrServer, Long)) ⇒ Boolean = ..., mapPredictedResponseTime: (Long) ⇒ Long = identity, clock: Clock = Clock.systemDefault) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Builder
  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 Builder(solrServers: SolrServers, collectionAndTestQuery: (SolrServer) ⇒ (String, SolrQuery), minDelay: Duration = 100 millis, maxDelay: Duration = 10 seconds, initialTestRuns: Int = 10, filterFastServers: (Long) ⇒ ((SolrServer, Long)) ⇒ Boolean = ..., mapPredictedResponseTime: (Long) ⇒ Long = identity, clock: Clock = Clock.systemDefault)

    Permalink

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. def build[F[_]](implicit futureFactory: FutureFactory[F]): FastestServerLB[F]

    Permalink
  6. def build(): FastestServerLB[CompletionStage]

    Permalink
  7. val clock: Clock

    Permalink
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val collectionAndTestQuery: (SolrServer) ⇒ (String, SolrQuery)

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. val filterFastServers: (Long) ⇒ ((SolrServer, Long)) ⇒ Boolean

    Permalink
  12. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. val initialTestRuns: Int

    Permalink
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val mapPredictedResponseTime: (Long) ⇒ Long

    Permalink
  17. val maxDelay: Duration

    Permalink
  18. val minDelay: Duration

    Permalink
  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 solrServers: SolrServers

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. def withClock(clock: Clock): Builder

    Permalink

    The clock to get the current time from.

  28. def withFilterFastServers(filter: LongFunction[BiFunction[SolrServer, Long, Boolean]]): Builder

    Permalink

    A function to filter fast / preferred servers.

    A function to filter fast / preferred servers. The function takes the calculated average duration of all servers of a collection, and returns a function for a SolrServer->Duration tuple that returns true/false to indicate if a server should be considered "fast".
    The default value for filterFastServers uses duration <= average * 1.1 + 5 (use 1.1 as multiplier to accept some deviation, for smaller values like 1 or 2 millis also add some fix value to allow normal deviation).

  29. def withInitialTestRuns(count: Int): Builder

    Permalink

    On start each active server is tested the given number of times to gather initial stats and determine fast/slow servers.

  30. def withMapPredictedResponseTime(mapPredictedResponseTime: Function[Long, Long]): Builder

    Permalink

    A function that's applied to the predicted response time.

    A function that's applied to the predicted response time. This can e.g. be used to quantize the time so that minor differences are ignored.

  31. def withMaxDelay(value: Long, unit: TimeUnit): Builder

    Permalink

    The delay between tests for slow servers (or all servers if there are no real requests)

  32. def withMinDelay(value: Long, unit: TimeUnit): Builder

    Permalink

    The minimum delay between the response of a test and the start of the next test (to limit test frequency)

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped