public interface VolatileFunction extends Function
Marker interface indicating that that the function return value can change during a single data access operation even if the argument values provided to it remain constant
Very few functions are truly volatile, one example being random(), whose value is going to change over each invocation, even during the same feature collection filtering
Functions whose value changes over time but not within the same feature collection filtering are considered to be stable and as such their result can be considered a constant during the single data access operation
GeoTools will try to optimize out the stable functions and replace them with a constant that can be easily encoded in whatever native filtering mechanism the datastores have
Given the vast majority of function are stable by the above definition only the fews that aren't suitable for constant replacement during a single run against a feature collection should be marked as volatile
Copyright © 1996–2018 Geotools. All rights reserved.