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 = average => {
case (_, duration) => duration <= average * 1.1 + 5
}, mapPredictedResponseTime: (Long) => Long = identity, isUpdatesToLeaders: Boolean = false, clock: Clock = Clock.systemDefault) extends Product with Serializable
- Alphabetic
- By Inheritance
- Builder
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Builder(solrServers: SolrServers, collectionAndTestQuery: (SolrServer) => (String, SolrQuery), minDelay: Duration = 100 millis, maxDelay: Duration = 10 seconds, initialTestRuns: Int = 10, filterFastServers: (Long) => ((SolrServer, Long)) => Boolean = average => {
case (_, duration) => duration <= average * 1.1 + 5
}, mapPredictedResponseTime: (Long) => Long = identity, isUpdatesToLeaders: Boolean = false, clock: Clock = Clock.systemDefault)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def build[F[_]](implicit futureFactory: FutureFactory[F]): FastestServerLB[F]
- def build(): FastestServerLB[CompletionStage]
- val clock: Clock
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- val collectionAndTestQuery: (SolrServer) => (String, SolrQuery)
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val filterFastServers: (Long) => ((SolrServer, Long)) => Boolean
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val initialTestRuns: Int
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isUpdatesToLeaders: Boolean
- val mapPredictedResponseTime: (Long) => Long
- val maxDelay: Duration
- val minDelay: Duration
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val solrServers: SolrServers
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withClock(clock: Clock): Builder
The clock to get the current time from.
- def withFilterFastServers(filter: LongFunction[BiFunction[SolrServer, Long, Boolean]]): Builder
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 usesduration <= 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). - def withInitialTestRuns(count: Int): Builder
On start each active server is tested the given number of times to gather initial stats and determine fast/slow servers.
- def withMapPredictedResponseTime(mapPredictedResponseTime: Function[Long, Long]): Builder
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.
- def withMaxDelay(value: Long, unit: TimeUnit): Builder
The delay between tests for slow servers (or all servers if there are no real requests)
- def withMinDelay(value: Long, unit: TimeUnit): Builder
The minimum delay between the response of a test and the start of the next test (to limit test frequency)
- def withUpdatesToLeaders(isUpdatesToLeaders: Boolean): Builder
If set to
true, update requests will be sent to shard leaders ifIsUpdateRequest.isSendToLeadersistrueas well.If set to
true, update requests will be sent to shard leaders ifIsUpdateRequest.isSendToLeadersistrueas well. Default isfalse
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)