Package org.apache.kafka.streams
Class StoreQueryParameters<T>
java.lang.Object
org.apache.kafka.streams.StoreQueryParameters<T>
StoreQueryParameters allows you to pass a variety of parameters when fetching a store for interactive query.- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedStoreQueryParameters(String storeName, QueryableStoreType<T> queryableStoreType, Integer partition, boolean staleStores) 
- 
Method SummaryModifier and TypeMethodDescriptionEnable querying of stale state stores, i.e., allow to query active tasks during restore as well as standby tasks.booleanstatic <T> StoreQueryParameters<T>fromNameAndType(String storeName, QueryableStoreType<T> queryableStoreType) inthashCode()Get the store partition that will be queried.Get the queryable store type for which key is queried by the user.booleanGet the flag staleStores.Get the name of the state store that should be queried.toString()withPartition(Integer partition) Set a specific partition that should be queried exclusively.
- 
Constructor Details- 
StoreQueryParametersprotected StoreQueryParameters(String storeName, QueryableStoreType<T> queryableStoreType, Integer partition, boolean staleStores) 
 
- 
- 
Method Details- 
fromNameAndTypepublic static <T> StoreQueryParameters<T> fromNameAndType(String storeName, QueryableStoreType<T> queryableStoreType) 
- 
withPartitionSet a specific partition that should be queried exclusively.- Parameters:
- partition- The specific integer partition to be fetched from the stores list by using- StoreQueryParameters.
- Returns:
- StoreQueryParameters a new StoreQueryParametersinstance configured with the specified partition
 
- 
enableStaleStoresEnable querying of stale state stores, i.e., allow to query active tasks during restore as well as standby tasks.- Returns:
- StoreQueryParameters a new StoreQueryParametersinstance configured with serving from stale stores enabled
 
- 
storeNameGet the name of the state store that should be queried.- Returns:
- String state store name
 
- 
queryableStoreTypeGet the queryable store type for which key is queried by the user.- Returns:
- QueryableStoreType type of queryable store
 
- 
partitionGet the store partition that will be queried. If the method returnsnull, it would mean that no specific partition has been requested, so all the local partitions for the store will be queried.- Returns:
- Integer partition
 
- 
staleStoresEnabledpublic boolean staleStoresEnabled()Get the flag staleStores. Iftrue, include standbys and recovering stores along with running stores.- Returns:
- boolean staleStores
 
- 
equals
- 
toString
- 
hashCodepublic int hashCode()
 
-