Twitter Util v19.2.0 Release Notes
Release Date: 2019-02-21 // about 5 years ago-
๐ New Features
- โก๏ธ util-core: updated
Reader#fromFuture
to resolve itsonClose
when reading of end-of-stream.
f2a05474 - util-core: Added
Reader.flatten
to flatten aReader[Reader[_]]
toReader[_]
,
andReader.fromSeq
to create a new Reader from a Seq. a49bab4d - util-core: Added
Duration.fromMinutes
to return aDuration
from a given number of minutes.
eda0b390 - util-core: If given a
Timer
upon construction,c.t.io.Pipe
will respect the close
deadline and wait the given amount of time for any pending writes to be read. 0a142872 - ๐ util-core: Optimized
ConstFuture.proxyTo
which brings the performance of
flatMap
andtransform
of aConstFuture
in line withmap
. de4cebda - โฑ util-core: Experimental toggle (com.twitter.util.BypassScheduler) for speeding up
ConstFuture.map
(transformTry
). The mechanism, when turned on, runs map operations
โฑ immediately (why not when we have a concrete value), instead of via the Scheduler, where it may
be queued and potentially reordered, e.g.:
๐จf.flatMap { _ => println(1); g.map { _ => println(2) }; println(3) }
will print1 2 3
,
๐จ where it would have printed1 3 2
. aeafba1a - ๐ util-security:
Pkcs8KeyManagerFactory
now supports a certificates file which contains multiple
certificates that are part of the same certificate chain. 337e270f
๐ Bug Fixes
- ๐ util-core: Fixed the behavior in
c.t.io.Reader
whereReader#flatMap
fails to propagate
parent reader'sonClose
. f2a05474
โ Runtime Behavior Changes
- util-core: Closing a
c.t.io.Pipe
will notifyonClose
when the deadline has passed whereas
before the pipe would wait indefinitely for a read before transitioning to the Closed state.
0a142872 - ๐ util-core: Don't allow
AsyncSemaphore
Permit
s to be released multiple times. Before it was
๐ possible to release a permit more than once and incorrectly remove waiters from the queue.
๐ With this change, therelease
permit operation is idempotent. ea24c951
๐ฅ Breaking API Changes
- ๐ util-core: Remove
c.t.u.CountDownLatch
which is an extremely thin shim around
j.u.c.CountDownLatch
that provides pretty limited value. To migrate toj.u.c.CountDownLatch
,
instead ofc.t.u.CountDownLatch#await(Duration)
, please use
j.u.c.CountDownLatch#await(int, TimeUnit)
, and instead of
๐ปc.t.u.CountDownLatch#within(Duration)
, please throw an exception yourself after awaiting.
b9914f15 - ๐ util-core: Deprecated conversions in
c.t.conversions
have new implementations
that follow a naming scheme ofSomethingOps
. df397f53percent
is nowPercentOps
storage
is nowStorageUnitOps
string
is nowStringOps
thread
is nowThreadOps
time
is nowDurationOps
u64
is nowU64Ops
- util-collection: Delete util-collection. We deleted
GenerationalQueue
,MapToSetAdapter
, and
ImmutableLRU
, because we found that they were of little utility. We deletedLruMap
because it
๐ was a very thin shim around aj.u.LinkedHashMap
, where you overrideremoveEldestEntry
. If you
๐ needSynchronizedLruMap
, you can wrap yourLinkedHashMap
with
๐j.u.Collection.synchronizedMap
. We movedRecordSchema
into finagle-base-http because it was
๐ฆ basically only used for HTTP messages, so its new package name isc.t.f.http.collection
.
60eff0a4 - util-core: Rename
BlacklistStatsReceiver
toDenylistStatsReceiver
. ed3f7069 - util-core:
Buf.Composite
is now private. Program against more generic,Buf
interface instead.
41e24395
- โก๏ธ util-core: updated