Hi Carsten, On Tue, Dec 24, 2013 at 11:11 AM, Carsten Ziegeler <[email protected]> wrote: > ...It's not just about the metadata - it's about uniquely identifying a HC > within the executor - the service object is not a good key, especially as > we have no way to discard it from the cache...
I don't understand why the service object cannot be used as a key. In my SLING-3278-bertrand.patch the HealthCheckExecutorImpl maintains a Map<HealthCheck, HealthCheckExecutionWrapper> and uses a ServiceTracker to make sure there's exactly one entry in this map per registered HealthCheck service. You can search for "wrappers" at [1] to see how that works. Then, when executing an HC, its value is used to retrieve the corresponding wrapper and all is well - the wrapper can then take care of Futures, cache management etc. What's the problem with that? -Bertrand [1] https://issues.apache.org/jira/secure/attachment/12619079/SLING-3278-bertrand.patch
