Package org.apache.kafka.streams.state
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()headers()static <AGG> AggregationWithHeaders<AGG>static <AGG> AggregationWithHeaders<AGG>makeAllowNullable(AGG aggregation, Headers headers) Create a newAggregationWithHeadersinstance.toString()
-
Method Details
-
make
- 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
- 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
-
equals
-
hashCode
public int hashCode() -
toString
-