On Wed, Nov 29, 2017 at 12:22 PM, Alex Plehanov <plehanov.a...@gmail.com> wrote:
> Hello, Igniters! > > We need the ability to enable or disable statistics for caches in runtime. > For now, there is a cache configuration property which seems modifiable in > runtime and this, at first sight, works for local node. But there are no > methods to enable or disable statistics for cache cluster wide. > > So, I propose: > > Create a new JMX operation in > CacheClusterMetricsMXBeanImpl/CacheLocalMetricsMXBeanImpl > to enable/disable statistics for cache. When invoked, operation must set > statisticsEnabled flag in cache configurations. Then send a new type of > DiscoveryCustomMessage, which will set this flag for cache on other nodes > in cluster. > > Do you have objections to this solution? > Why do we need a discovery message? A simple cluster broadcast should do. I think it makes sense to make this solution generic enough, so other JMX metrics could be enabled/disabled using the same mechanism. D.