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

java.lang.Object
  extended by org.mule.transport.polling.watermark.selector.WatermarkSelector
      extended by org.mule.transport.polling.watermark.selector.ComparableWatermarkSelector
Direct Known Subclasses:
MaxValueWatermarkSelector, MinValueWatermarkSelector

public abstract class ComparableWatermarkSelector
extends WatermarkSelector

Base class for WatermarkSelectors that evaluate Comparable objects. When a non Comparable value is received, is is discarded.

Since:
3.5.0

Field Summary
 
Fields inherited from class org.mule.transport.polling.watermark.selector.WatermarkSelector
value
 
Constructor Summary
ComparableWatermarkSelector()
           
 
Method Summary
 void acceptValue(Object value)
          Receives a value which is candidate to become the new watermark value.
protected abstract  int comparableQualifier()
          Returns an int value according to the Comparable contract (-1, 0, 1).
 
Methods inherited from class org.mule.transport.polling.watermark.selector.WatermarkSelector
getSelectedValue, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComparableWatermarkSelector

public ComparableWatermarkSelector()
Method Detail

comparableQualifier

protected abstract int comparableQualifier()
Returns an int value according to the Comparable contract (-1, 0, 1). Then the result of the comparation matches this method's return value, then the selected value is updated


acceptValue

public final void acceptValue(Object value)
Description copied from class: WatermarkSelector
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

Specified by:
acceptValue in class WatermarkSelector


Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.