polishing

This commit is contained in:
Juergen Hoeller
2012-05-28 00:11:55 +02:00
parent dcb44264ad
commit 5875695d99
6 changed files with 24 additions and 31 deletions

View File

@@ -1,8 +1,6 @@
/**
* Annotations and supporting classes for declarative cache management.
* Hooked into Spring's caching interception infrastructure
* via {@link org.springframework.cache.interceptor.CacheOperationSource
* CacheOperationSource} implementation.
* Hooked into Spring's cache interception infrastructure via
* {@link org.springframework.cache.interceptor.CacheOperationSource}.
*/
package org.springframework.cache.annotation;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -62,6 +62,7 @@ public class ConcurrentMapCache implements Cache {
/**
* Create a new ConcurrentMapCache with the specified name.
* @param name the name of the cache
* @param allowNullValues whether to accept and convert null values for this cache
*/
public ConcurrentMapCache(String name, boolean allowNullValues) {
this(name, new ConcurrentHashMap<Object, Object>(), allowNullValues);
@@ -115,7 +116,7 @@ public class ConcurrentMapCache implements Cache {
/**
* Convert the given value from the internal store to a user value
* returned from the get method (adapting <code>null</code>).
* @param userValue the store value
* @param storeValue the store value
* @return the value to return to the user
*/
protected Object fromStoreValue(Object storeValue) {

View File

@@ -1,9 +1,7 @@
/**
* Implementation package for {@code java.util.concurrent} based caches.
* Provides a {@link org.springframework.cache.CacheManager CacheManager}
* and {@link org.springframework.cache.Cache Cache} implementation for
* use in a Spring context.
* use in a Spring context, using a JDK based thread pool at runtime.
*/
package org.springframework.cache.concurrent;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,10 +57,6 @@ public class EhCacheCache implements Cache {
return this.cache;
}
public void clear() {
this.cache.removeAll();
}
public ValueWrapper get(Object key) {
Element element = this.cache.get(key);
return (element != null ? new SimpleValueWrapper(element.getObjectValue()) : null);
@@ -74,4 +70,8 @@ public class EhCacheCache implements Cache {
this.cache.remove(key);
}
public void clear() {
this.cache.removeAll();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -39,20 +39,19 @@ public class EhCacheCacheManager extends AbstractCacheManager {
/**
* Returns the backing Ehcache {@link net.sf.ehcache.CacheManager}.
* @return
*/
public net.sf.ehcache.CacheManager getCacheManager() {
return cacheManager;
}
/**
* Sets the backing EhCache {@link net.sf.ehcache.CacheManager}.
* Set the backing EhCache {@link net.sf.ehcache.CacheManager}.
*/
public void setCacheManager(net.sf.ehcache.CacheManager cacheManager) {
this.cacheManager = cacheManager;
}
/**
* Return the backing EhCache {@link net.sf.ehcache.CacheManager}.
*/
public net.sf.ehcache.CacheManager getCacheManager() {
return this.cacheManager;
}
@Override
protected Collection<Cache> loadCaches() {
@@ -83,4 +82,5 @@ public class EhCacheCacheManager extends AbstractCacheManager {
}
return cache;
}
}
}

View File

@@ -1,11 +1,7 @@
/**
*
* Support classes for the open source cache
* <a href="http://ehcache.sourceforge.net">Ehcache</a>,
* allowing to set up an EHCache CacheManager and Caches
* <a href="http://ehcache.sourceforge.net">EhCache</a>,
* allowing to set up an EhCache CacheManager and Caches
* as beans in a Spring context.
*
*/
package org.springframework.cache.ehcache;