Releases: twitter/util
Util 19.3.0
Util 19.2.0
New Features
- util-core: updated
Reader#fromFutureto resolve itsonClosewhen reading of end-of-stream.
f2a05474 - util-core: Added
Reader.flattento flatten aReader[Reader[_]]toReader[_],
andReader.fromSeqto create a new Reader from a Seq. a49bab4d - util-core: Added
Duration.fromMinutesto return aDurationfrom a given number of minutes.
eda0b390 - util-core: If given a
Timerupon construction,c.t.io.Pipewill respect the close
deadline and wait the given amount of time for any pending writes to be read. 0a142872 - util-core: Optimized
ConstFuture.proxyTowhich brings the performance of
flatMapandtransformof aConstFuturein 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:
Pkcs8KeyManagerFactorynow 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.ReaderwhereReader#flatMapfails to propagate
parent reader'sonClose. f2a05474
Runtime Behavior Changes
- util-core: Closing a
c.t.io.Pipewill notifyonClosewhen 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
AsyncSemaphorePermits 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, thereleasepermit operation is idempotent. ea24c951
Breaking API Changes
- util-core: Remove
c.t.u.CountDownLatchwhich is an extremely thin shim around
j.u.c.CountDownLatchthat 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.conversionshave new implementations
that follow a naming scheme ofSomethingOps. df397f53percentis nowPercentOpsstorageis nowStorageUnitOpsstringis nowStringOpsthreadis nowThreadOpstimeis nowDurationOpsu64is nowU64Ops
- util-collection: Delete util-collection. We deleted
GenerationalQueue,MapToSetAdapter, and
ImmutableLRU, because we found that they were of little utility. We deletedLruMapbecause it
was a very thin shim around aj.u.LinkedHashMap, where you overrideremoveEldestEntry. If you
needSynchronizedLruMap, you can wrap yourLinkedHashMapwith
j.u.Collection.synchronizedMap. We movedRecordSchemainto 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
BlacklistStatsReceivertoDenylistStatsReceiver. ed3f7069 - util-core:
Buf.Compositeis now private. Program against more generic,Bufinterface instead.
41e24395
Util 19.1.0
New Features
- util-core: Added Reader.map/flatMap to transform Reader[A] to Reader[B]. Added fromFuture()
and value() in the Reader object to construct a new Reader. ac15ad8b
Breaking API Changes
- util-core: The implicit conversions classes in c.t.conversions.SomethingOps have been
renamed to have unique names. This allows them to be used together with wildcard imports.
See Github issue (#239). 2d5d6da9 - util-core: Both c.t.io.Writer.FailingWriter and c.t.io.Writer.fail were removed. Build your
own instance should you need to. 63815225
Util 18.12.0
18.12.0
New Features
- util-core: Provide a way to listen for stream termination to c.t.util.Reader, Reader#onClose
which is satisfied when the stream is discarded or read until the end. 3b1434e2 - util-core: Conversions in c.t.conversions have new implementations
that follow a naming scheme of SomethingOps. Where possible the implementations
are AnyVal based avoiding allocations for the common usage pattern.
ee56e5f2- percent is now PercentOps
- storage is now StorageUnitOps
- string is now StringOps
- thread is now ThreadOps
- time is now DurationOps
- u64 is now U64Ops
Bug Fixes
- util-core: Fixed a bug where tail would sometimes return Some empty AsyncStream instead of None.
1dc614bc
Deprecations
- util-core: Conversions in c.t.conversions have been deprecated in favor of SomethingOps
versions. Where possible the implementations are AnyVal based and use implicit classes
instead of implicit conversions. ee56e5f2- percent is now PercentOps
- storage is now StorageUnitOps
- string is now StringOps
- thread is now ThreadOps
- time is now DurationOps
- u64 is now U64Ops
Breaking API Changes
- util-core: Experimental c.t.io.exp.MinThroughput utilities were removed. d9c5e4a3
- util-core: Deleted c.t.io.Reader.Null, which was incompatible with Reader#onClose semantics.
c.t.io.Reader#empty[Nothing] is a drop-in replacement. 3b1434e2 - util-core: Removed c.t.util.U64 bits. Use c.t.converters.u64._ instead. 8034e557
Util 18.11.0
Breaking API Changes
- util-core: c.t.u.Future.raiseWithin methods now take the timeout exception as a call-by-name
parameter instead of a strict exception. While Scala programs should compile as usual, Java
users will need to use a scala.Function0 as the second parameter. The helper
c.t.u.Function.func0 can be helpful. 9bde57ca - util-core: Rename c.t.io.Reader.ReaderDiscarded to c.t.io.ReaderDiscardedException.
a970c5b5
Runtime Behavior Changes
- util-core: Made Stopwatch.timeNanos monotone. 8d35b496
Util 18.10.0
Breaking API Changes
-
util-core:
c.t.io.Reader.Writableandc.t.Reader.writable()are removed. Usec.t.io.Pipe
instead. 5ef6a0dc -
util-core:
c.t.util.TempFolderhas been moved toc.t.io.TempFolder. 2f8ee904 -
util-core: Removed the forwarding types
c.t.util.TimeConversionsand
c.t.util.StorageUnitConversions. Usec.t.conversions.timeand
c.t.conversions.storagedirectly. 0c83ebc0 -
util-core:
c.t.concurrent.AsyncStream.fromReaderhas been moved to
c.t.io.Reader.toAsyncStream. 6c3be47d
New Features
- util-core:
c.t.io.Reader.fromBuf(BufReader),c.t.io.Reader.fromFile,
c.t.io.Reader.fromInputStream(InputStreamReader) now take an additional parameter,
chunkSize, the upper bound of the number of bytes that a given reader emits at each read.
719f41a6
Runtime Behavior Changes
- util-core:
c.t.u.Duration.inTimeUnitcan now return
j.u.c.TimeUnit.MINUTES. 0daac8d7
Util 18.9.1
Util 18.9.0
18.9.0
New Features
- util-logging: New way to construct ScribeHandler for java interoperability.
845620b4 - util-core: Added Reader#fromAsyncStream for consuming an AsyncStream as a Reader.
39ec9849 - util-core: Introducing Reader.chunked that chunks the output of a given reader.
1a7c54f9 - util-core: Added Reader#framed for consuming data framed by a user supplied function.
2316aa5d - util-security: Add NullSslSession related objects for use with non-existent
SSLSessions. 12de479f
Breaking API Changes
-
util-core: c.t.io.Reader and c.t.io.Writer are now abstracted over the type
they produce/consume (Reader[A] and Writer[A]) and are no longer fixed to Buf.
7718fa29 -
util-core: InMemoryStatsReceiver now eagerly creates the mappings for Counters
and Stats instead of waiting for the first call to Counter.incr and Stat.add.
97f0f0fa -
util-core: c.t.io.Reader.Writable is now c.t.io.Pipe. Both Writable type and
its factory method are deprecated; use new Pipe[A] instead. cbff9760 -
util-slf4j-api: Ensure that marker information is used when determining if log
level is enabled for methods which support markers. 02d80820 -
util-slfj4-api: Finalize the underlying logger def in the Logging trait as it is not
expected that this be overridable. If users wish to change how the underlying logger is
constructed they should simply use the Logger and its methods directly rather than
configuring the the underlying logger of the Logging trait.Add better Java compatibility for constructing a Logger. 56569b9f
Util 18.8.0
18.8.0 2018-08-06
Bug Fixes:
- util-core: Fixed an issue with Future.joinWith where it waits for
completion of both futures even if one has failed. This also affects
the join method, which is implemented in terms of joinWith. 9b598f3f
Util 18.7.0
API Changes
- util-core: Local.Context used to be a type alias for Array[Option[_]], now it is
a new key-value liked structure. faaf0f2f