simplify cache api

This commit is contained in:
Sebastian Sdorra
2014-01-09 20:06:07 +01:00
parent 2e6748cb23
commit 908f2fe6c8
17 changed files with 107 additions and 209 deletions

View File

@@ -89,10 +89,8 @@ public abstract class CacheManagerTestBase<C extends Cache>
@Test
public void testSameReference()
{
Cache<String, String> c1 = cacheManager.getCache(String.class,
String.class, "test-1");
Cache<String, String> c2 = cacheManager.getCache(String.class,
String.class, "test-1");
Cache<String, String> c1 = cacheManager.getCache("test-1");
Cache<String, String> c2 = cacheManager.getCache("test-1");
assertIsSame(c1, c2);
}
@@ -203,16 +201,16 @@ public abstract class CacheManagerTestBase<C extends Cache>
@Override
public Cache call() throws Exception
{
return cacheManager.getCache(String.class, String.class, name);
return cacheManager.getCache(name);
}
//~--- fields -------------------------------------------------------------
/** Field description */
private CacheManager cacheManager;
private final CacheManager cacheManager;
/** Field description */
private String name;
private final String name;
}

View File

@@ -76,7 +76,7 @@ public abstract class CacheTestBase
public void before()
{
cm = createCacheManager();
cache = cm.getCache(String.class, String.class, "test");
cache = cm.getCache("test");
}
/**