My Oracle Support Banner

Is There A Code Implementation that Clears the Cache but Preserves the MBean Metrics (Doc ID 2745663.1)

Last updated on MARCH 25, 2024

Applies to:

Oracle Coherence - Version 12.2.1.4.0 and later
Information in this document applies to any platform.

Goal

Total gets and total puts for a cache service are set to zero after the user is doing truncate. User is not destroying the service but truncating. Why the Coherence JMX metrics being reset? What can the user use to clear the cache but preserve the total gets and total puts unless the cache service is restarted. We know cache.clear() is resource intensive. That's known to users and we have advised cache users to use destroy() or truncate() method. The problem is for cache service MBean, there are some metrics called TotalPuts and TotalGets. With destroy () method we observed that it is resetting these metrics to zero as cache service is restarted on using destroy (). We thought of using cache.truncate() it clears the cache with similar performance, but it does not restart the service. Somehow, we are seeing the MBean properties being reset to zero again.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 Requirements
 Configuring
 Instructions
 Sample Code
 Sample Output
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.