Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2020 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.
|
||||
@@ -35,6 +35,7 @@ import org.springframework.util.Assert;
|
||||
* @author Juergen Hoeller
|
||||
* @author Stephane Nicoll
|
||||
* @since 4.3
|
||||
* @see CaffeineCacheManager
|
||||
*/
|
||||
@UsesJava8
|
||||
public class CaffeineCache extends AbstractValueAdaptingCache {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2020 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.
|
||||
@@ -92,7 +92,6 @@ public class EhCacheCache implements Cache {
|
||||
this.cache.releaseWriteLockOnKey(key);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private <T> T loadValue(Object key, Callable<T> valueLoader) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2020 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.
|
||||
@@ -32,6 +32,7 @@ import org.springframework.cache.transaction.AbstractTransactionSupportingCacheM
|
||||
* @author Juergen Hoeller
|
||||
* @author Stephane Nicoll
|
||||
* @since 3.1
|
||||
* @see EhCacheCache
|
||||
*/
|
||||
public class EhCacheCacheManager extends AbstractTransactionSupportingCacheManager {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2020 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.
|
||||
@@ -27,13 +27,14 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* {@link org.springframework.cache.Cache} implementation on top of a
|
||||
* {@link javax.cache.Cache} instance.
|
||||
* {@link Cache javax.cache.Cache} instance.
|
||||
*
|
||||
* <p>Note: This class has been updated for JCache 1.0, as of Spring 4.0.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Stephane Nicoll
|
||||
* @since 3.2
|
||||
* @see JCacheCacheManager
|
||||
*/
|
||||
public class JCacheCache extends AbstractValueAdaptingCache {
|
||||
|
||||
@@ -41,7 +42,7 @@ public class JCacheCache extends AbstractValueAdaptingCache {
|
||||
|
||||
|
||||
/**
|
||||
* Create an {@link org.springframework.cache.jcache.JCacheCache} instance.
|
||||
* Create a {@code JCacheCache} instance.
|
||||
* @param jcache backing JCache Cache instance
|
||||
*/
|
||||
public JCacheCache(Cache<Object, Object> jcache) {
|
||||
@@ -49,7 +50,7 @@ public class JCacheCache extends AbstractValueAdaptingCache {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an {@link org.springframework.cache.jcache.JCacheCache} instance.
|
||||
* Create a {@code JCacheCache} instance.
|
||||
* @param jcache backing JCache Cache instance
|
||||
* @param allowNullValues whether to accept and convert null values for this cache
|
||||
*/
|
||||
@@ -123,7 +124,7 @@ public class JCacheCache extends AbstractValueAdaptingCache {
|
||||
}
|
||||
catch (Exception ex) {
|
||||
throw new EntryProcessorException("Value loader '" + valueLoader + "' failed " +
|
||||
"to compute value for key '" + entry.getKey() + "'", ex);
|
||||
"to compute value for key '" + entry.getKey() + "'", ex);
|
||||
}
|
||||
entry.setValue(toStoreValue(value));
|
||||
return value;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2020 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.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.cache.transaction.AbstractTransactionSupportingCacheM
|
||||
|
||||
/**
|
||||
* {@link org.springframework.cache.CacheManager} implementation
|
||||
* backed by a JCache {@link javax.cache.CacheManager}.
|
||||
* backed by a JCache {@link CacheManager javax.cache.CacheManager}.
|
||||
*
|
||||
* <p>Note: This class has been updated for JCache 1.0, as of Spring 4.0.
|
||||
*
|
||||
@@ -42,15 +42,18 @@ public class JCacheCacheManager extends AbstractTransactionSupportingCacheManage
|
||||
|
||||
|
||||
/**
|
||||
* Create a new JCacheCacheManager, setting the target JCache CacheManager
|
||||
* through the {@link #setCacheManager} bean property.
|
||||
* Create a new {@code JCacheCacheManager} without a backing JCache
|
||||
* {@link CacheManager javax.cache.CacheManager}.
|
||||
* <p>The backing JCache {@code javax.cache.CacheManager} can be set via the
|
||||
* {@link #setCacheManager} bean property.
|
||||
*/
|
||||
public JCacheCacheManager() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new JCacheCacheManager for the given backing JCache.
|
||||
* @param cacheManager the backing JCache {@link javax.cache.CacheManager}
|
||||
* Create a new {@code JCacheCacheManager} for the given backing JCache
|
||||
* {@link CacheManager javax.cache.CacheManager}.
|
||||
* @param cacheManager the backing JCache {@code javax.cache.CacheManager}
|
||||
*/
|
||||
public JCacheCacheManager(CacheManager cacheManager) {
|
||||
this.cacheManager = cacheManager;
|
||||
@@ -58,14 +61,14 @@ public class JCacheCacheManager extends AbstractTransactionSupportingCacheManage
|
||||
|
||||
|
||||
/**
|
||||
* Set the backing JCache {@link javax.cache.CacheManager}.
|
||||
* Set the backing JCache {@link CacheManager javax.cache.CacheManager}.
|
||||
*/
|
||||
public void setCacheManager(CacheManager cacheManager) {
|
||||
this.cacheManager = cacheManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the backing JCache {@link javax.cache.CacheManager}.
|
||||
* Return the backing JCache {@link CacheManager javax.cache.CacheManager}.
|
||||
*/
|
||||
public CacheManager getCacheManager() {
|
||||
return this.cacheManager;
|
||||
|
||||
Reference in New Issue
Block a user