Package com.linecorp.armeria.common
Interface AggregationOptions
An
AggregationOptions
to control the aggregation behavior of HttpMessage
.-
Method Summary
Modifier and TypeMethodDescriptionalloc()
(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.executor()
Returns theEventExecutor
that executes the aggregation.boolean
Returns whether to return the cachedAggregatedHttpMessage
if there's one.static AggregationOptions
usePooledObjects
(ByteBufAllocator alloc) Returns a newAggregationOptions
that createsPooledObjects
without making a copy using theByteBufAllocator
.static AggregationOptions
usePooledObjects
(ByteBufAllocator alloc, 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
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
.
-