Skip to content

Commit

Permalink
finagle: rename FailedFast onOrOff to enabled
Browse files Browse the repository at this point in the history
Problem

`onOrOff` is a confusing name for a boolean parameter.

Solution

Rename it to `enabled`.

RB_ID=720781
TBR=true
USER_HOOK_ARGS=--i-am-evil -x macaw-swift/.hooks/PRESUBMIT/check-swoop
  • Loading branch information
luciferous authored and jenkins committed Jul 27, 2015
1 parent 33df2bd commit f60e9d8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ New Features
Runtime Behavior Changes
~~~~~~~~~~~~~~~~~~~~~~~~

* finagle-core: FailFast parameter renamed from `onOrOff` to `enabled`. ``RB_ID=720781``

* finagle-core: When evaluating NameTree unions, return components of the union in Ok state rather
than waiting for all components to be Ok. This enables resilience of unions when part of the
tree cannot be resolved. ``RB_ID=697114``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,17 +772,17 @@ class ClientBuilder[Req, Rep, HasCluster, HasCodec, HasHostConnectionLimit] priv
"No longer experimental: Use failFast()." +
"The new default value is true, so replace .expFailFast(true) with nothing at all",
"5.3.10")
def expFailFast(onOrOff: Boolean): This =
failFast(onOrOff)
def expFailFast(enabled: Boolean): This =
failFast(enabled)

/**
* Marks a host dead on connection failure. The host remains dead
* until we successfully connect. Intermediate connection attempts
* *are* respected, but host availability is turned off during the
* reconnection period.
*/
def failFast(onOrOff: Boolean): This =
configured(FailFast(onOrOff))
def failFast(enabled: Boolean): This =
configured(FailFast(enabled))

/**
* When true, the client is daemonized. As with java threads, a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ object FailFastFactory {
* For details on usage see the
* [[https://twitter.github.io/finagle/guide/FAQ.html#why-do-clients-see-com-twitter-finagle-failedfastexception-s FAQ]]
*/
case class FailFast(onOrOff: Boolean) {
case class FailFast(enabled: Boolean) {
def mk(): (FailFast, Stack.Param[FailFast]) =
(this, FailFast.param)
}
object FailFast {
implicit val param = Stack.Param(FailFast(onOrOff = true))
implicit val param = Stack.Param(FailFast(enabled = true))
}

/**
Expand Down

0 comments on commit f60e9d8

Please sign in to comment.