IN - The type of the input data handled by this policy. An
Extractor can be used to extract DATA for IN.DATA - The type of the punctuation. An Extractor can be used to
extract DATA for IN.public class PunctuationPolicy<IN,DATA> extends Object implements CloneableTriggerPolicy<IN>, CloneableEvictionPolicy<IN>
ActiveEvictionPolicyWrapper to make it react on punctuation even in
fake elements.| Constructor and Description |
|---|
PunctuationPolicy(DATA punctuation)
Creates the punctuation policy without using any extractor.
|
PunctuationPolicy(DATA punctuation,
Extractor<IN,DATA> extractor)
Creates the punctuation policy which uses the specified extractor to
isolate the punctuation from the data.
|
| Modifier and Type | Method and Description |
|---|---|
PunctuationPolicy<IN,DATA> |
clone()
This method should return an exact copy of the object it belongs to
including the current object state.
|
boolean |
equals(Object other) |
int |
notifyEviction(IN datapoint,
boolean triggered,
int bufferSize)
Proves if and how many elements should be deleted from the element
buffer.
|
boolean |
notifyTrigger(IN datapoint)
Proves and returns if a new window should be started.
|
String |
toString() |
public PunctuationPolicy(DATA punctuation)
punctuation - the punctuation which leads to trigger/evict.public PunctuationPolicy(DATA punctuation, Extractor<IN,DATA> extractor)
punctuation - the punctuation which leads to trigger/evict.extractor - An Extractor which converts IN to DATA.public int notifyEviction(IN datapoint, boolean triggered, int bufferSize)
EvictionPolicynotifyEviction in interface EvictionPolicy<IN>datapoint - data point the data point which arrivedtriggered - Information whether the UDF was triggered or notbufferSize - The current size of the element buffer at the operatorpublic boolean notifyTrigger(IN datapoint)
TriggerPolicynotifyTrigger in interface TriggerPolicy<IN>datapoint - the data point which arrivedpublic PunctuationPolicy<IN,DATA> clone()
CloneableTriggerPolicyclone in interface CloneableEvictionPolicy<IN>clone in interface CloneableTriggerPolicy<IN>clone in class ObjectCopyright © 2014–2015 The Apache Software Foundation. All rights reserved.