Package com.linecorp.armeria.common
Class AggregationOptionsBuilder
java.lang.Object
com.linecorp.armeria.common.AggregationOptionsBuilder
A builder for
AggregationOptions
.-
Method Summary
Modifier and TypeMethodDescriptionalloc
(ByteBufAllocator alloc) (Advanced users only) Sets theByteBufAllocator
that can be used to create aPooledObjects
without making a copy.build()
Returns a newly createdAggregationOptions
with the properties set so far.cacheResult
(boolean cache) Returns whether to cache the aggregation result.executor
(EventExecutor executor) Sets theEventExecutor
to run the aggregation function on.
-
Method Details
-
executor
Sets theEventExecutor
to run the aggregation function on. -
cacheResult
Returns whether to cache the aggregation result. This option is disabled by default. Note that this method andalloc(ByteBufAllocator)
are mutually exclusive. Ifalloc(ByteBufAllocator)
} is set and this option is enabled, anIllegalStateException
will be raised. -
alloc
(Advanced users only) Sets theByteBufAllocator
that can be used to create aPooledObjects
without making a copy. If unspecified, abyte[]
-basedHttpData
is created.PooledObjects
cannot be cached since they have their own life cycle. Therefore, that this method andcacheResult(boolean)
are mutually exclusive. IfcacheResult(boolean)
is enabled and this option is set, anIllegalStateException
will be raised. -
build
Returns a newly createdAggregationOptions
with the properties set so far.
-