org.mule.transport.polling.watermark.selector
Class WatermarkSelector

java.lang.Object
  extended by org.mule.transport.polling.watermark.selector.WatermarkSelector
Direct Known Subclasses:
ComparableWatermarkSelector, FirstItemWatermarkSelector, LastItemWatermarkSelector, WatermarkSelectorWrapper

public abstract class WatermarkSelector
extends Object

A watermark selector receives values and selects which one should be the new watermark value

Since:
3.5.0

Field Summary
protected  Object value
          The selected value
 
Constructor Summary
WatermarkSelector()
           
 
Method Summary
abstract  void acceptValue(Object value)
          Receives a value which is candidate to become the new watermark value.
 Object getSelectedValue()
          Returns the selected value.
 void reset()
          Returns this selector to a blank state so that it can be reused
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected Object value
The selected value

Constructor Detail

WatermarkSelector

public WatermarkSelector()
Method Detail

acceptValue

public abstract void acceptValue(Object value)
Receives a value which is candidate to become the new watermark value. No thread-safeness is guaranteed by this contract. It's up to each client/implementation to handle that


getSelectedValue

public Object getSelectedValue()
Returns the selected value. This contract does not guarantee idempotency. Continuous invocations to this method might return different values if acceptValue(Object) is invoked in between. Thread-safeness is also not guaranteed by this contract

Returns:
the selected value

reset

public void reset()
Returns this selector to a blank state so that it can be reused



Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.