SafeComparerCompareEntries Method |
Namespace: Tangosol.Util.Comparator
public virtual int CompareEntries( IQueryCacheEntry entry1, IQueryCacheEntry entry2 )
Exception | Condition |
---|---|
InvalidCastException | If the arguments' types prevent them from being compared by this IComparer. |
ArgumentException | If the extractor cannot handle the passed objects for any other reason; an implementor should include a descriptive message. |
If possible, use the Extract(IValueExtractor) method to optimize the value extraction process.
This method is expected to be implemented by IComparer wrappers, which simply pass on this invocation to the wrapped IComparer objects if they too implement this interface, or to invoke their default compare method passing the actual objects (not the extracted values) obtained from the extractor using the passed entries.
This interface is also expected to be implemented by IValueExtractor implementations that implement the IComparer interface. It is expected that in most cases, the IComparer wrappers will eventually terminate at (i.e. delegate to) IValueExtractors that also implement this interface.