io.micrometer.core.instrument.binder.cache.CacheMeterBinder Java Examples

The following examples show how to use io.micrometer.core.instrument.binder.cache.CacheMeterBinder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RemoteCacheMetricBinderTest.java    From infinispan-spring-boot with Apache License 2.0 5 votes vote down vote up
@Override
public CacheMeterBinder binder() {
   cache = infinispanServerExtension.hotRodClient().getCache("mycache");
   RemoteInfinispanCacheMeterBinderProvider remoteInfinispanCacheMeterBinderProvider = new RemoteInfinispanCacheMeterBinderProvider();
   return (CacheMeterBinder) remoteInfinispanCacheMeterBinderProvider
         .getMeterBinder(new SpringCache(cache), emptyList());
}
 
Example #2
Source File: Hazelcast3CacheMetricsCompatibilityTest.java    From micrometer with Apache License 2.0 4 votes vote down vote up
@Override
public CacheMeterBinder binder() {
    return new HazelcastCacheMetrics(cache, emptyList());
}
 
Example #3
Source File: MemcachedCacheMeterBinderProvider.java    From memcached-spring-boot with Apache License 2.0 4 votes vote down vote up
@Override
public CacheMeterBinder getMeterBinder(MemcachedCache memcachedCache, Iterable<Tag> tags) {
    return new MemcachedCacheMetrics(memcachedCache, memcachedCache.getName(), tags);
}
 
Example #4
Source File: InfinispanCacheMetricBinderTest.java    From infinispan-spring-boot with Apache License 2.0 4 votes vote down vote up
@Override
public CacheMeterBinder binder() {
   cacheManager = new DefaultCacheManager();
   cache = cacheManager.administration().withFlags(CacheContainerAdmin.AdminFlag.VOLATILE).getOrCreateCache("mycache", new ConfigurationBuilder().jmxStatistics().enable().build());
   return new InfinispanCacheMeterBinder(cache, emptyList());
}