Package com.linecorp.armeria.common
Interface AggregationOptions
An
AggregationOptions
to control the aggregation behavior of HttpMessage
.-
Method Summary
Modifier and TypeMethodDescription@Nullable io.netty.buffer.ByteBufAllocator
alloc()
(Advanced users only) Returns theByteBufAllocator
that can be used to create aPooledObjects
without making a copy.static AggregationOptionsBuilder
builder()
Returns a newAggregationOptionsBuilder
.boolean
Returns whether to cache the aggregation result.@Nullable io.netty.util.concurrent.EventExecutor
executor()
Returns theEventExecutor
that executes the aggregation.boolean
Returns whether to return the cachedAggregatedHttpMessage
if there's one.static AggregationOptions
usePooledObjects
(io.netty.buffer.ByteBufAllocator alloc) Returns a newAggregationOptions
that createsPooledObjects
without making a copy using theByteBufAllocator
.static AggregationOptions
usePooledObjects
(io.netty.buffer.ByteBufAllocator alloc, io.netty.util.concurrent.EventExecutor executor) Returns a newAggregationOptions
that createsPooledObjects
without making a copy using theByteBufAllocator
.
-
Method Details
-
builder
Returns a newAggregationOptionsBuilder
. -
usePooledObjects
Returns a newAggregationOptions
that createsPooledObjects
without making a copy using theByteBufAllocator
. -
usePooledObjects
static AggregationOptions usePooledObjects(io.netty.buffer.ByteBufAllocator alloc, io.netty.util.concurrent.EventExecutor executor) Returns a newAggregationOptions
that createsPooledObjects
without making a copy using theByteBufAllocator
. The specifiedEventExecutor
is used to run the aggregation function. -
executor
Returns theEventExecutor
that executes the aggregation. -
cacheResult
boolean cacheResult()Returns whether to cache the aggregation result. -
preferCached
boolean preferCached()Returns whether to return the cachedAggregatedHttpMessage
if there's one. -
alloc
(Advanced users only) Returns theByteBufAllocator
that can be used to create aPooledObjects
without making a copy. Ifnull
, abyte[]
-basedHttpData
is created.PooledObjects
cannot be cached since they have their own life cycle. Therefore, ifcacheResult()
is set totrue
, this method always returnsnull
.
-