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 Object implements WindowBytesStoreSupplier
-
-
Constructor Summary
Constructors Constructor Description InMemoryWindowBytesStoreSupplier(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 newStateStore
instance.String
metricsScope()
Return a String that is used as the scope for metrics recorded by Metered stores.String
name()
Return the name of this state store supplier.boolean
retainDuplicates()
Whether or not this store is retaining duplicate keys.long
retentionPeriod()
The time period for which theWindowStore
will retain historic data.long
segmentIntervalMs()
The size of the segments (in milliseconds) the store has.int
segments()
Deprecated.String
toString()
long
windowSize()
The size of the windows (in milliseconds) any store created from this supplier is creating.
-
-
-
Constructor Detail
-
InMemoryWindowBytesStoreSupplier
public InMemoryWindowBytesStoreSupplier(String name, long retentionPeriod, long windowSize, boolean retainDuplicates)
-
-
Method Detail
-
name
public String name()
Description copied from interface:StoreSupplier
Return the name of this state store supplier. This must be a valid Kafka topic name; valid characters are ASCII alphanumerics, '.', '_' and '-'.- Specified by:
name
in 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:StoreSupplier
Return a newStateStore
instance.- Specified by:
get
in interfaceStoreSupplier<WindowStore<org.apache.kafka.common.utils.Bytes,byte[]>>
- Returns:
- a new
StateStore
instance of type T
-
metricsScope
public String metricsScope()
Description copied from interface:StoreSupplier
Return a String that is used as the scope for metrics recorded by Metered stores.- Specified by:
metricsScope
in interfaceStoreSupplier<WindowStore<org.apache.kafka.common.utils.Bytes,byte[]>>
- Returns:
- metricsScope
-
segments
@Deprecated public int segments()
Deprecated.Description copied from interface:WindowBytesStoreSupplier
The 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:
segments
in interfaceWindowBytesStoreSupplier
- Returns:
- number of segments
-
retentionPeriod
public long retentionPeriod()
Description copied from interface:WindowBytesStoreSupplier
The time period for which theWindowStore
will retain historic data.- Specified by:
retentionPeriod
in interfaceWindowBytesStoreSupplier
- Returns:
- retentionPeriod
-
windowSize
public long windowSize()
Description copied from interface:WindowBytesStoreSupplier
The size of the windows (in milliseconds) any store created from this supplier is creating.- Specified by:
windowSize
in interfaceWindowBytesStoreSupplier
- Returns:
- window size
-
segmentIntervalMs
public long segmentIntervalMs()
Description copied from interface:WindowBytesStoreSupplier
The 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:
segmentIntervalMs
in interfaceWindowBytesStoreSupplier
- Returns:
- size of the segments (in milliseconds)
-
retainDuplicates
public boolean retainDuplicates()
Description copied from interface:WindowBytesStoreSupplier
Whether 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:
retainDuplicates
in interfaceWindowBytesStoreSupplier
- Returns:
- true if duplicates should be retained
-
-