Twitter Util v20.12.0 Release Notes
-
๐ฅ Breaking API Changes
* ๐ util-core: removed `com.twitter.util.Config.` ``PHAB_ID=D580444`` * ๐ util-core: removed `com.twitter.util.Future.isDone` method. The semantics of this method are surprising in that `Future.exception(throwable).isDone == false`. Replace usages with `Future.isDefined` or `Future.poll` ``PHAB_ID=D585700`` * util-stats: Changed `com.twitter.finagle.stats.MethodBuilder#withName`, `com.twitter.finagle.stats.MethodBuilder#withRelativeName`, `com.twitter.finagle.stats.MethodBuilder#withPercentiles`, `com.twitter.finagle.stats.MethodBuilder#counter`, and `com.twitter.finagle.stats.MethodBuilder#histogram`, to accept varargs as parameters, rather than a `Seq`. Added a Java-friendly `com.twitter.finagle.stats.MethodBuilder#gauge`. ``PHAB_ID=D620425`` ๐ New Features ~~~~~~~~~~~~ * util-core: `c.t.conversions` now includes conversion methods for maps (under `MapOps`) that were moved from Finatra. ``PHAB_ID=D578819`` * util-core: `c.t.conversions` now includes conversion methods for tuples (under `TupleOps`) that were moved from Finatra. ``PHAB_ID=D578804`` * util-core: `c.t.conversions` now includes conversion methods for seqs (under `SeqOps`) that were moved from Finatra. ``PHAB_ID=D578605`` * util-core: `c.t.conversions` now includes conversion methods `toOption`, and `getOrElse` under `StringOps`. ``PHAB_ID=D578549`` * util-core: `c.t.util.Duration` now includes `fromJava` and `asJava` conversions to `java.time.Duration` types. ``PHAB_ID=D571885`` โ Runtime Behavior Changes
util-core:
Activity.apply(Event)
will now propagate registry events to the underlyingEvent
instead of registering once and deregistering on garbage collection. This means that if the underlyingEvent
is "notified" while the derivedActivity
is not actively being observed, it will not pick up the notification. Furthermore, the derivedActivity
will revert to theActivity.Pending
state while it is not under observation.PHAB_ID=D574843
util-core:
Activity#stabilize
will now propagate registry events to the underlyingActivity
instead of registering once and deregistering on garbage collection. This means that if the underlyingActivity
is changed to a new state while the derivedActivity
is not actively being observed, it will not update its own state. The derivedActivity
will maintain its last "stable" state when it's next observed, unless the underlyingActivity
was updated to a new "stable" state, in which case it will pick that up instead.PHAB_ID=D574843
util-stats:
c.t.finagle.stats.DenylistStatsReceiver
now includes methods for creatingDenyListStatsReceiver
from partial functions.PHAB_ID=D576833
๐ util-core:
c.t.util.FuturePool
now supports exporting the number of its pending tasks vianumPendingTasks
.PHAB_ID=D583030