dschneider-pivotal commented on pull request #7456:
URL: https://github.com/apache/geode/pull/7456#issuecomment-1075770508


   @upthewaterspout Geode's ResourceManager is a singleton and it will only 
have one instance of HeapUsageProvider. Geode has an implementation of 
HeapUsageProvider on the class path but it is not a service. Geode's instance 
handles all the JVMs and GCs we support. The only reason for defining a service 
that implements HeapUsageProvider is if you want to replace geode's built in 
one. So at that point you will have two on the class path and only the service 
one will be used.
   If you define multiple services that implement HeapUsageProvider then only 
the first one returned by the ServiceLoader will be constructed and used. We 
could just document this behavior. I don't see a need to make it more 
complicated. I'm not that familiar with the ServiceLoader so it would be good 
to know if this is a strange way of using java services.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to