I'm suggesting using standard Java 8 function interfaces for the callbacks - IntSupplier, DoubleSupplier, etc. I can change the name of the argument to supplier.
-Dan On Wed, Jun 1, 2016 at 4:18 PM, Xiaojian Zhou <[email protected]> wrote: > what's the difference btw supplier and sampler? > > On Wed, Jun 1, 2016 at 4:12 PM, Dan Smith <[email protected]> wrote: > >> Hi, >> >> I'd like to add some new methods to the Statistics interface to compute >> statistics using callbacks. My original motivation for this is to make it >> easy to record statistics that come from lucene for our lucene integration, >> but I think this could simplify recording statistics in a lot of places. >> >> The basic idea is that the user provides a callback that returns the value >> of the statistic. Geode will call the callback every sample interval to >> recompute the value. >> >> See the JIRA for more details: >> https://issues.apache.org/jira/browse/GEODE-1494 >> >> Thoughts? >> >> -Dan >>
