From 51a5f1e7f3bcb70e570a0bab7d216f93eb69f28f Mon Sep 17 00:00:00 2001 From: Greg Luck Date: Wed, 20 Nov 2013 16:41:52 +1000 Subject: [PATCH] Fix more todos --- ...AbstractInternalCacheKeyInvocationContext.java | 3 --- .../org/jsr107/ri/management/RICacheMXBean.java | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cache-annotations-ri/cache-annotations-ri-common/src/main/java/org/jsr107/ri/annotations/AbstractInternalCacheKeyInvocationContext.java b/cache-annotations-ri/cache-annotations-ri-common/src/main/java/org/jsr107/ri/annotations/AbstractInternalCacheKeyInvocationContext.java index f5aa648..37c1a1a 100644 --- a/cache-annotations-ri/cache-annotations-ri-common/src/main/java/org/jsr107/ri/annotations/AbstractInternalCacheKeyInvocationContext.java +++ b/cache-annotations-ri/cache-annotations-ri-common/src/main/java/org/jsr107/ri/annotations/AbstractInternalCacheKeyInvocationContext.java @@ -94,7 +94,6 @@ public StaticCacheKeyInvocationContext getStaticCacheKeyInvocationContext() { */ @Override protected Object[] getParameters(I invocation) { - // TODO Auto-generated method stub return null; } @@ -104,7 +103,6 @@ protected Object[] getParameters(I invocation) { */ @Override protected Method getMethod(I invocation) { - // TODO Auto-generated method stub return null; } @@ -114,7 +112,6 @@ protected Method getMethod(I invocation) { */ @Override protected Object getTarget(I invocation) { - // TODO Auto-generated method stub return null; } diff --git a/cache-ri-impl/src/main/java/org/jsr107/ri/management/RICacheMXBean.java b/cache-ri-impl/src/main/java/org/jsr107/ri/management/RICacheMXBean.java index 0207992..2321a0d 100644 --- a/cache-ri-impl/src/main/java/org/jsr107/ri/management/RICacheMXBean.java +++ b/cache-ri-impl/src/main/java/org/jsr107/ri/management/RICacheMXBean.java @@ -24,16 +24,17 @@ /** * Class to help implementers * - * todo add key and value types - * * @param the type of keys maintained by this map * @param the type of mapped values* * @author Yannis Cosmadopoulos * @since 1.0 */ public class RICacheMXBean implements CacheMXBean { + private final Cache cache; + + /** * Constructor * @@ -43,6 +44,16 @@ public RICacheMXBean(Cache cache) { this.cache = cache; } + @Override + public String getKeyType() { + return cache.getConfiguration(CompleteConfiguration.class).getKeyType().getName(); + } + + @Override + public String getValueType() { + return cache.getConfiguration(CompleteConfiguration.class).getValueType().getName(); + } + /** * {@inheritDoc} */