Class InMemoryWindowBytesStoreSupplier
- java.lang.Object
-
- org.apache.kafka.streams.state.internals.InMemoryWindowBytesStoreSupplier
-
- All Implemented Interfaces:
StoreSupplier<WindowStore<org.apache.kafka.common.utils.Bytes,byte[]>>,WindowBytesStoreSupplier
public class InMemoryWindowBytesStoreSupplier extends java.lang.Object implements WindowBytesStoreSupplier
-
-
Constructor Summary
Constructors Constructor Description InMemoryWindowBytesStoreSupplier(java.lang.String name, long retentionPeriod, long windowSize, boolean retainDuplicates)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description WindowStore<org.apache.kafka.common.utils.Bytes,byte[]>get()Return a newStateStoreinstance.java.lang.StringmetricsScope()Return a String that is used as the scope for metrics recorded by Metered stores.java.lang.Stringname()Return the name of this state store supplier.booleanretainDuplicates()Whether or not this store is retaining duplicate keys.longretentionPeriod()The time period for which theWindowStorewill retain historic data.longsegmentIntervalMs()The size of the segments (in milliseconds) the store has.intsegments()Deprecated.java.lang.StringtoString()longwindowSize()The size of the windows (in milliseconds) any store created from this supplier is creating.
-
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:StoreSupplierReturn the name of this state store supplier. This must be a valid Kafka topic name; valid characters are ASCII alphanumerics, '.', '_' and '-'.- Specified by:
namein interfaceStoreSupplier<WindowStore<org.apache.kafka.common.utils.Bytes,byte[]>>- Returns:
- the name of this state store supplier
-
get
public WindowStore<org.apache.kafka.common.utils.Bytes,byte[]> get()
Description copied from interface:StoreSupplierReturn a newStateStoreinstance.- Specified by:
getin interfaceStoreSupplier<WindowStore<org.apache.kafka.common.utils.Bytes,byte[]>>- Returns:
- a new
StateStoreinstance of type T
-
metricsScope
public java.lang.String metricsScope()
Description copied from interface:StoreSupplierReturn a String that is used as the scope for metrics recorded by Metered stores.- Specified by:
metricsScopein interfaceStoreSupplier<WindowStore<org.apache.kafka.common.utils.Bytes,byte[]>>- Returns:
- metricsScope
-
segments
@Deprecated public int segments()
Deprecated.Description copied from interface:WindowBytesStoreSupplierThe number of segments the store has. If your store is segmented then this should be the number of segments in the underlying store. It is also used to reduce the amount of data that is scanned when caching is enabled.- Specified by:
segmentsin interfaceWindowBytesStoreSupplier- Returns:
- number of segments
-
retentionPeriod
public long retentionPeriod()
Description copied from interface:WindowBytesStoreSupplierThe time period for which theWindowStorewill retain historic data.- Specified by:
retentionPeriodin interfaceWindowBytesStoreSupplier- Returns:
- retentionPeriod
-
windowSize
public long windowSize()
Description copied from interface:WindowBytesStoreSupplierThe size of the windows (in milliseconds) any store created from this supplier is creating.- Specified by:
windowSizein interfaceWindowBytesStoreSupplier- Returns:
- window size
-
segmentIntervalMs
public long segmentIntervalMs()
Description copied from interface:WindowBytesStoreSupplierThe size of the segments (in milliseconds) the store has. If your store is segmented then this should be the size of segments in the underlying store. It is also used to reduce the amount of data that is scanned when caching is enabled.- Specified by:
segmentIntervalMsin interfaceWindowBytesStoreSupplier- Returns:
- size of the segments (in milliseconds)
-
retainDuplicates
public boolean retainDuplicates()
Description copied from interface:WindowBytesStoreSupplierWhether or not this store is retaining duplicate keys. Usually only true if the store is being used for joins. Note this should return false if caching is enabled.- Specified by:
retainDuplicatesin interfaceWindowBytesStoreSupplier- Returns:
- true if duplicates should be retained
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-