Releases: twitter/util
Util 19.3.0
Util 19.2.0
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 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.Writable
andc.t.Reader.writable()
are removed. Usec.t.io.Pipe
instead. 5ef6a0dc -
util-core:
c.t.util.TempFolder
has been moved toc.t.io.TempFolder
. 2f8ee904 -
util-core: Removed the forwarding types
c.t.util.TimeConversions
and
c.t.util.StorageUnitConversions
. Usec.t.conversions.time
and
c.t.conversions.storage
directly. 0c83ebc0 -
util-core:
c.t.concurrent.AsyncStream.fromReader
has 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.inTimeUnit
can 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