Class AggregationOptionsBuilder
AggregationOptions
.-
Method Summary
Modifier and TypeMethodDescriptionalloc
(ByteBufAllocator alloc) Deprecated.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.(Advanced users only) Sets theByteBufAllocator.DEFAULT
that can be used to createPooledObjects
without making a copy.usePooledObjects
(ByteBufAllocator alloc) (Advanced users only) Sets theByteBufAllocator.DEFAULT
that can be used to createPooledObjects
without making a copy.usePooledObjects
(ByteBufAllocator alloc, boolean preferCached) (Advanced users only) Sets theByteBufAllocator
that can be used to createPooledObjects
without making a copy.
-
Method Details
-
executor
Sets theEventExecutor
to run the aggregation function. -
cacheResult
Returns whether to cache the aggregation result. This option is disabled by default. Note that this method andusePooledObjects(ByteBufAllocator)
are mutually exclusive. IfusePooledObjects(ByteBufAllocator)
} is set and this option is enabled, anIllegalStateException
will be raised. -
alloc
Deprecated.(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, this method andcacheResult(boolean)
are mutually exclusive. IfcacheResult(boolean)
is enabled and this option is set, anIllegalStateException
will be raised. -
usePooledObjects
(Advanced users only) Sets theByteBufAllocator.DEFAULT
that can be used to createPooledObjects
without making a copy. If theHttpMessage
is already aggregated and cached, this option is ineffective and the cachedAggregatedHttpMessage
is returned.PooledObjects
cannot be cached since they have their own life cycle. Therefore, this method andcacheResult(boolean)
are mutually exclusive. IfcacheResult(boolean)
is enabled and this option is set, anIllegalStateException
will be raised. -
usePooledObjects
(Advanced users only) Sets theByteBufAllocator.DEFAULT
that can be used to createPooledObjects
without making a copy. If theHttpMessage
is already aggregated and cached, this option is ineffective and the cachedAggregatedHttpMessage
is returned.PooledObjects
cannot be cached since they have their own life cycle. Therefore, this method andcacheResult(boolean)
are mutually exclusive. IfcacheResult(boolean)
is enabled and this option is set, anIllegalStateException
will be raised. -
usePooledObjects
(Advanced users only) Sets theByteBufAllocator
that can be used to createPooledObjects
without making a copy. If theHttpMessage
is already aggregated and cached, the cachedAggregatedHttpMessage
is returned ifpreferCached
istrue
. ifpreferCached
isfalse
, anIllegalStateException
will be raised.PooledObjects
cannot be cached since they have their own life cycle. Therefore, 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.
-
usePooledObjects(ByteBufAllocator, boolean)
.