public abstract class Scheme extends Object implements Monoidal
Strategy
since it needs to
control when the aggregation strategy resets its result etc. Windowing schemes generally accept
data even if they are Closable.isClosed()
or isClosedForPartition()
. It is up to the user to make sure data
is emitted and the window is reset and feed it data accordingly.Modifier and Type | Field and Description |
---|---|
protected Strategy |
aggregation |
protected Map<String,String> |
metadataKeys |
protected Window |
window |
Constructor and Description |
---|
Scheme(Strategy aggregation,
Window window,
BulletConfig config)
|
Modifier and Type | Method and Description |
---|---|
Meta |
getMetadata()
|
protected abstract Map<String,Object> |
getMetadata(Map<String,String> metadataKeys)
Return any metadata for the windowing scheme with the given configured names for the metadata concepts.
|
abstract boolean |
isClosedForPartition()
Returns true if this window is closed when operating in partition mode.
|
abstract void |
resetForPartition()
Resets the window when operating in partition mode.
|
abstract void |
start()
Readies the window for querying.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Scheme(Strategy aggregation, Window window, BulletConfig config)
aggregation
- The non-null initialized aggregation strategy that this window will operate.window
- The initialized, configured window to use.config
- The validated config to use.protected abstract Map<String,Object> getMetadata(Map<String,String> metadataKeys)
metadataKeys
- The mapping of metadata concepts to their names to get metadata for.Map
of strings to objects of the metadata.public abstract boolean isClosedForPartition()
public abstract void resetForPartition()
public abstract void start()
Querier.restart()
.public Meta getMetadata()
getMetadata
in interface Monoidal
Copyright © 2021. All rights reserved.