Class AggregationWithHeaders<AGG>
java.lang.Object
org.apache.kafka.streams.state.AggregationWithHeaders<AGG>
- Type Parameters:
AGG- the aggregation type
Combines an aggregated value with its associated record headers. This is used by SessionStoreWithHeaders to store session aggregations along with headers.
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <AGG> AGGgetAggregationOrNull(AggregationWithHeaders<AGG> aggregationWithHeaders) Return the wrappedaggregationof the givenaggregationWithHeadersparameter if the parameter is notnull.inthashCode()org.apache.kafka.common.header.Headersheaders()static <AGG> AggregationWithHeaders<AGG> make(AGG aggregation, org.apache.kafka.common.header.Headers headers) static <AGG> AggregationWithHeaders<AGG> makeAllowNullable(AGG aggregation, org.apache.kafka.common.header.Headers headers) Create a newAggregationWithHeadersinstance.toString()
Method Details
make
public static <AGG> AggregationWithHeaders<AGG> make(AGG aggregation, org.apache.kafka.common.header.Headers headers) - Type Parameters:
AGG- the type of the aggregation- Parameters:
aggregation- the aggregationheaders- the headers (may benull, treated as empty)- Returns:
- a new
AggregationWithHeadersinstance if the providedaggregationis notnull; otherwisenullis returned
makeAllowNullable
public static <AGG> AggregationWithHeaders<AGG> makeAllowNullable(AGG aggregation, org.apache.kafka.common.header.Headers headers) - Type Parameters:
AGG- the type of the aggregation- Parameters:
aggregation- the aggregation (may benull)headers- the headers (may benull, treated as empty)- Returns:
- a new
AggregationWithHeadersinstance
getAggregationOrNull
Return the wrappedaggregationof the givenaggregationWithHeadersparameter if the parameter is notnull.- Type Parameters:
AGG- the type of the aggregation- Parameters:
aggregationWithHeaders- anAggregationWithHeadersinstance; can benull- Returns:
- the wrapped
aggregationofaggregationWithHeadersif notnull; otherwisenull
aggregation
headers
public org.apache.kafka.common.header.Headers headers()equals
hashCode
toString