Class ClusterCacheStatsImpl

    • Method Detail

      • injectDependencies

        public void injectDependencies​(Cache<?,​?> cache,
                                       Configuration configuration)
      • start

        public void start()
      • getAverageReadTime

        @ManagedAttribute(description="Cluster wide total average number of milliseconds for a read operation on the cache",
                          displayName="Cluster wide total average read time (ms)",
                          units=MILLISECONDS)
        public long getAverageReadTime()
        Specified by:
        getAverageReadTime in interface Stats
        Returns:
        Average number of milliseconds for a cache get on the cache
      • getAverageReadTimeNanos

        @ManagedAttribute(description="Cluster wide total average number of nanoseconds for a read operation on the cache",
                          displayName="Cluster wide total average read time (ns)",
                          units=NANOSECONDS)
        public long getAverageReadTimeNanos()
        Specified by:
        getAverageReadTimeNanos in interface Stats
        Returns:
        Average number of nanoseconds for a cache get on the cache
      • getAverageRemoveTime

        @ManagedAttribute(description="Cluster wide total average number of milliseconds for a remove operation in the cache",
                          displayName="Cluster wide total average remove time (ms)",
                          units=MILLISECONDS)
        public long getAverageRemoveTime()
        Specified by:
        getAverageRemoveTime in interface Stats
        Returns:
        Average number of milliseconds for a cache remove on the cache
      • getAverageRemoveTimeNanos

        @ManagedAttribute(description="Cluster wide total average number of nanoseconds for a remove operation in the cache",
                          displayName="Cluster wide total average remove time (ns)",
                          units=NANOSECONDS)
        public long getAverageRemoveTimeNanos()
        Specified by:
        getAverageRemoveTimeNanos in interface Stats
        Returns:
        Average number of nanoseconds for a cache remove on the cache
      • getAverageWriteTime

        @ManagedAttribute(description="Cluster wide average number of milliseconds for a write operation in the cache",
                          displayName="Cluster wide average write time (ms)",
                          units=MILLISECONDS)
        public long getAverageWriteTime()
        Specified by:
        getAverageWriteTime in interface Stats
        Returns:
        Average number of milliseconds for a cache put on the cache
      • getAverageWriteTimeNanos

        @ManagedAttribute(description="Cluster wide average number of nanoseconds for a write operation in the cache",
                          displayName="Cluster wide average write time (ns)",
                          units=NANOSECONDS)
        public long getAverageWriteTimeNanos()
        Specified by:
        getAverageWriteTimeNanos in interface Stats
        Returns:
        Average number of milliseconds for a cache put on the cache
      • getRequiredMinimumNumberOfNodes

        @ManagedAttribute(description="Required minimum number of nodes to hold current cache data",
                          displayName="Required minimum number of nodes")
        public int getRequiredMinimumNumberOfNodes()
        Specified by:
        getRequiredMinimumNumberOfNodes in interface Stats
        Returns:
        Required minimum number of nodes to guarantee data consistency
      • getEvictions

        @ManagedAttribute(description="Cluster wide total number of cache eviction operations",
                          displayName="Cluster wide total number of cache evictions",
                          measurementType=TRENDSUP)
        public long getEvictions()
        Specified by:
        getEvictions in interface Stats
        Returns:
        Number of cache eviction.
      • getHits

        @ManagedAttribute(description="Cluster wide total number of cache attribute hits",
                          displayName="Cluster wide total number of cache hits",
                          measurementType=TRENDSUP)
        public long getHits()
        Specified by:
        getHits in interface Stats
        Returns:
        Number of cache get hits.
      • getHitRatio

        @ManagedAttribute(description="Cluster wide total percentage hit/(hit+miss) ratio for this cache",
                          displayName="Cluster wide total hit ratio",
                          units=PERCENTAGE)
        public double getHitRatio()
        Specified by:
        getHitRatio in interface ClusterCacheStats
        Returns:
        cluster wide total percentage hit/(hit+miss) ratio for this cache
      • getMisses

        @ManagedAttribute(description="Cluster wide total number of cache attribute misses",
                          displayName="Cluster wide total number of cache misses",
                          measurementType=TRENDSUP)
        public long getMisses()
        Specified by:
        getMisses in interface Stats
        Returns:
        Number of cache get misses.
      • getNumberOfEntries

        @ManagedAttribute(description="Cluster wide total number of entries currently in the cache, including passivated entries",
                          displayName="Cluster wide total number of current cache entries")
        public int getNumberOfEntries()
      • getCurrentNumberOfEntriesInMemory

        @ManagedAttribute(description="Cluster wide total number of entries currently stored in-memory",
                          displayName="Cluster wide total number of in-memory cache entries")
        public int getCurrentNumberOfEntriesInMemory()
        Description copied from interface: Stats
        The same as Stats.getCurrentNumberOfEntries(), however passivated entries are not included.
        Specified by:
        getCurrentNumberOfEntriesInMemory in interface Stats
      • getReadWriteRatio

        @ManagedAttribute(description="Cluster wide read/writes ratio for the cache",
                          displayName="Cluster wide read/write ratio",
                          units=PERCENTAGE)
        public double getReadWriteRatio()
        Specified by:
        getReadWriteRatio in interface ClusterCacheStats
        Returns:
        cluster wide read/writes ratio for the cache
      • getRemoveHits

        @ManagedAttribute(description="Cluster wide total number of cache removal hits",
                          displayName="Cluster wide total number of cache removal hits",
                          measurementType=TRENDSUP)
        public long getRemoveHits()
        Specified by:
        getRemoveHits in interface Stats
        Returns:
        Number of cache removal hits.
      • getRemoveMisses

        @ManagedAttribute(description="Cluster wide total number of cache removals where keys were not found",
                          displayName="Cluster wide total number of cache removal misses",
                          measurementType=TRENDSUP)
        public long getRemoveMisses()
        Specified by:
        getRemoveMisses in interface Stats
        Returns:
        Number of cache removal misses.
      • getStores

        @ManagedAttribute(description="Cluster wide total number of cache put operations",
                          displayName="Cluster wide total number of cache puts",
                          measurementType=TRENDSUP)
        public long getStores()
        Specified by:
        getStores in interface Stats
        Returns:
        Number of put operations on the cache.
      • getTimeSinceStart

        @ManagedAttribute(description="Number of seconds since the first cache node started",
                          displayName="Number of seconds since the first cache node started",
                          measurementType=TRENDSUP)
        public long getTimeSinceStart()
        Specified by:
        getTimeSinceStart in interface Stats
        Returns:
        Number of seconds since cache started.
      • getCurrentNumberOfEntries

        public int getCurrentNumberOfEntries()
        Description copied from interface: Stats
        Returns the number of entries currently in this cache instance. When the cache is configured with distribution, this method only returns the number of entries in the local cache instance. In other words, it does not attempt to communicate with other nodes to find out about the data stored in other nodes in the cluster that is not available locally.
        Specified by:
        getCurrentNumberOfEntries in interface Stats
        Returns:
        Number of entries currently in the cache, including passivated entries.
      • getTotalNumberOfEntries

        public long getTotalNumberOfEntries()
        Description copied from interface: Stats
        Number of entries stored in cache since the cache started running.
        Specified by:
        getTotalNumberOfEntries in interface Stats
      • getDataMemoryUsed

        @ManagedAttribute(description="Amount in bytes of memory used across the cluster for entries in this cache with eviction",
                          displayName="Cluster wide memory used by eviction")
        public long getDataMemoryUsed()
        Description copied from interface: Stats
        Provides how much memory the current eviction algorithm estimates is in use for data. This method will return a number 0 or greater if memory eviction is in use. If memory eviction is not enabled this method will always return 0.
        Specified by:
        getDataMemoryUsed in interface Stats
        Returns:
        memory in use or 0 if memory eviction is not enabled
      • getOffHeapMemoryUsed

        @ManagedAttribute(description="Amount in bytes of off-heap memory used across the cluster for this cache",
                          displayName="Cluster wide off-heap memory used")
        public long getOffHeapMemoryUsed()
        Description copied from interface: Stats
        The amount of off-heap memory used by this cache
        Specified by:
        getOffHeapMemoryUsed in interface Stats
        Returns:
      • getRetrievals

        public long getRetrievals()
        Specified by:
        getRetrievals in interface Stats
        Returns:
        Number of get operations.
      • getNumberOfLocksAvailable

        @ManagedAttribute(description="Total number of exclusive locks available in the cluster",
                          displayName="Cluster wide total number of locks")
        public int getNumberOfLocksAvailable()
        Specified by:
        getNumberOfLocksAvailable in interface ClusterCacheStats
        Returns:
        the total number of exclusive locks available in the cluster
      • getNumberOfLocksHeld

        @ManagedAttribute(description="Total number of locks held in the cluster",
                          displayName="Cluster wide total number of locks held")
        public int getNumberOfLocksHeld()
        Specified by:
        getNumberOfLocksHeld in interface ClusterCacheStats
        Returns:
        the total number of exclusive locks held in the cluster
      • getInvalidations

        @ManagedAttribute(description="The total number of invalidations in the cluster",
                          displayName="Cluster wide total number of invalidations",
                          measurementType=TRENDSUP)
        public long getInvalidations()
        Specified by:
        getInvalidations in interface ClusterCacheStats
        Returns:
        the total number of invalidations in the cluster
      • getActivations

        @ManagedAttribute(description="The total number of activations in the cluster",
                          displayName="Cluster wide total number of activations",
                          measurementType=TRENDSUP)
        public long getActivations()
        Specified by:
        getActivations in interface ClusterCacheStats
        Returns:
        the total number of actiavtions in the cluster
      • getPassivations

        @ManagedAttribute(description="The total number of passivations in the cluster",
                          displayName="Cluster wide total number of passivations",
                          measurementType=TRENDSUP)
        public long getPassivations()
        Specified by:
        getPassivations in interface ClusterCacheStats
        Returns:
        the total number of passivations in the cluster
      • getCacheLoaderLoads

        @ManagedAttribute(description="The total number of cacheloader load operations in the cluster",
                          displayName="Cluster wide total number of cacheloader loads",
                          measurementType=TRENDSUP)
        public long getCacheLoaderLoads()
        Specified by:
        getCacheLoaderLoads in interface ClusterCacheStats
        Returns:
        the total number of cacheloader load operations in the cluster
      • getCacheLoaderMisses

        @ManagedAttribute(description="The total number of cacheloader load misses in the cluster",
                          displayName="Cluster wide total number of cacheloader misses",
                          measurementType=TRENDSUP)
        public long getCacheLoaderMisses()
        Specified by:
        getCacheLoaderMisses in interface ClusterCacheStats
        Returns:
        the total number of cacheloader misses in the cluster
      • getStoreWrites

        @ManagedAttribute(description="The total number of cachestore store operations in the cluster",
                          displayName="Cluster wide total number of cachestore stores",
                          measurementType=TRENDSUP)
        public long getStoreWrites()
        Specified by:
        getStoreWrites in interface ClusterCacheStats
        Returns:
        the total number of cachewriter store operations in the cluster
      • getStaleStatsThreshold

        public abstract long getStaleStatsThreshold()
        Returns:
        The time in milliseconds, to wait between requests before re-retrieving cluster wide stats
      • setStaleStatsThreshold

        public abstract void setStaleStatsThreshold​(long threshold)
        Parameters:
        threshold - the time in milliseconds, to wait between requests before re-retrieving cluster wide stats