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
- Alphabetic
- By Inheritance
- Builder
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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 = ..., mapPredictedResponseTime: (Long) ⇒ Long = identity, 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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val collectionAndTestQuery: (SolrServer) ⇒ (String, SolrQuery)
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val filterFastServers: (Long) ⇒ ((SolrServer, Long)) ⇒ Boolean
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val initialTestRuns: Int
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val solrServers: SolrServers
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
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)