Skip to content

Commit

Permalink
util, finagle, twitter-server: Remove JavaSingleton Trait
Browse files Browse the repository at this point in the history
Problem / Solution

The `JavaSingleton` trait in util is lightly used and doesn't provide
functionality in the way that it's intended to work. Let's remove
its single uses within Finagle and Twitter Server and encourage folks
to take a different approach for better Java compatibility.

JIRA Issues: CSL-9080

Differential Revision: https://phabricator.twitter.biz/D399947
  • Loading branch information
ryanoneill authored and jenkins committed Nov 14, 2019
1 parent 7e4232a commit 9ffb3d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ Note that ``PHAB_ID=#`` and ``RB_ID=#`` correspond to associated messages in com
Unreleased
----------

Runtime Behavior Changes
~~~~~~~~~~~~~~~~~~~~~~~~

* finagle-netty4: Change the 'connection_requests' metric to debug verbosity.
``PHAB_ID=D391289``

Breaking API Changes
~~~~~~~~~~~~~~~~~~~~

* finagle-core: The `RetryPolicy` companion object is no longer a `JavaSingleton`.
``PHAB_ID=D399947``

19.11.0
-------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,7 @@ import com.twitter.finagle.{
TimeoutException,
WriteException
}
import com.twitter.util.{
Duration,
JavaSingleton,
Return,
Throw,
Try,
TimeoutException => UtilTimeoutException
}
import com.twitter.util.{Duration, Return, Throw, Try, TimeoutException => UtilTimeoutException}
import java.util.{concurrent => juc}
import java.{util => ju}
import scala.collection.JavaConverters._
Expand Down Expand Up @@ -155,7 +148,7 @@ abstract class SimpleRetryPolicy[A](i: Int)
final val never = Duration.Top
}

object RetryPolicy extends JavaSingleton {
object RetryPolicy {

/**
* An extractor for exceptions which are known to be safe to retry.
Expand Down

0 comments on commit 9ffb3d1

Please sign in to comment.