Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.util.filter
Class ValueChangeEventFilter

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.util.BitHelper
          extended by com.tangosol.util.ExternalizableHelper
              extended by com.tangosol.util.filter.AbstractQueryRecorderFilter
                  extended by com.tangosol.util.filter.ExtractorFilter
                      extended by com.tangosol.util.filter.ValueChangeEventFilter

All Implemented Interfaces:
ExternalizableLite, PortableObject, Filter, EntryFilter, IndexAwareFilter, QueryRecorderFilter, java.io.Serializable

public class ValueChangeEventFilter
extends ExtractorFilter
implements Filter

Filter which evaluates the content of a MapEvent values based on the specified value extractor. This filter evaluates to true only for update events that change the value of an extracted attribute.

Example: a filter that evaluates to true if there is an update to an Employee object that changes a value of the LastName property.

   new ValueChangeEventFilter("LastName");
 
Since:
Coherence 2.3
Author:
gg 2003.09.30
See Also:
MapEventFilter

Field Summary

 

Fields inherited from class com.tangosol.util.filter.ExtractorFilter
EVAL_COST, m_extractor

 

Constructor Summary
ValueChangeEventFilter()
          Default constructor (necessary for the ExternalizableLite interface).
ValueChangeEventFilter(java.lang.String sMethod)
          Construct a ValueChangeEventFilter that evaluates MapEvent values based on the specified method name.
ValueChangeEventFilter(ValueExtractor extractor)
          Construct a ValueChangeEventFilter that evaluates MapEvent values based on the specified extractor.

 

Method Summary
 boolean equals(java.lang.Object o)
          Compare the ValueChangeEventFilter with another object to determine equality.
 boolean evaluate(java.lang.Object o)
          Apply the test to the object.
protected  boolean evaluateExtracted(java.lang.Object oExtracted)
          Evaluate the specified extracted value.
 int hashCode()
          Determine a hash value for the ValueChangeEventFilter object according to the general Object.hashCode() contract.
 java.lang.String toString()
          Return a human-readable description for this Filter.

 

Methods inherited from class com.tangosol.util.filter.ExtractorFilter
applyIndex, calculateEffectiveness, calculateIteratorEffectiveness, evaluateEntry, extract, getValueExtractor, readExternal, readExternal, writeExternal, writeExternal

 

Methods inherited from class com.tangosol.util.filter.AbstractQueryRecorderFilter
explain, explain, explain, trace, trace, trace, trace, trace

 

Methods inherited from class com.tangosol.util.BitHelper
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString

 

Constructor Detail

ValueChangeEventFilter

public ValueChangeEventFilter()
Default constructor (necessary for the ExternalizableLite interface).

ValueChangeEventFilter

public ValueChangeEventFilter(ValueExtractor extractor)
Construct a ValueChangeEventFilter that evaluates MapEvent values based on the specified extractor.
Parameters:
extractor - ValueExtractor to extract MapEvent values

ValueChangeEventFilter

public ValueChangeEventFilter(java.lang.String sMethod)
Construct a ValueChangeEventFilter that evaluates MapEvent values based on the specified method name.
Parameters:
sMethod - the name of the method to invoke via reflection

Method Detail

evaluate

public boolean evaluate(java.lang.Object o)
Apply the test to the object.
Specified by:
evaluate in interface Filter
Overrides:
evaluate in class ExtractorFilter
Parameters:
o - the object to test
Returns:
true if the test passes, false otherwise

evaluateExtracted

protected boolean evaluateExtracted(java.lang.Object oExtracted)
Evaluate the specified extracted value.
Specified by:
evaluateExtracted in class ExtractorFilter
Parameters:
oExtracted - an extracted value to evaluate
Returns:
true iff the test passes

equals

public boolean equals(java.lang.Object o)
Compare the ValueChangeEventFilter with another object to determine equality.
Returns:
true iff this ValueChangeEventFilter and the passed object are equivalent filters

hashCode

public int hashCode()
Determine a hash value for the ValueChangeEventFilter object according to the general Object.hashCode() contract.
Returns:
an integer hash value for this ValueChangeEventFilter object

toString

public java.lang.String toString()
Return a human-readable description for this Filter.
Returns:
a String description of the Filter

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.