mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-16 17:55:15 +00:00
Allow SimpleCache to accept Object as opposed to just Serializable. It is possible now after EHCache changes
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5733 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
parent
6cc8f52082
commit
8ee3f781f4
@ -44,7 +44,7 @@ import org.alfresco.error.AlfrescoRuntimeException;
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
public class EhCacheAdapter<K extends Serializable, V extends Serializable>
|
||||
public class EhCacheAdapter<K extends Serializable, V extends Object>
|
||||
implements SimpleCache<K, V>
|
||||
{
|
||||
private net.sf.ehcache.Cache cache;
|
||||
|
@ -37,7 +37,7 @@ import java.util.Collections;
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
public class NullCache<K extends Serializable, V extends Serializable> implements SimpleCache<K, V>
|
||||
public class NullCache<K extends Serializable, V extends Object> implements SimpleCache<K, V>
|
||||
{
|
||||
public NullCache()
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ import java.util.Collection;
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
public interface SimpleCache<K extends Serializable, V extends Serializable>
|
||||
public interface SimpleCache<K extends Serializable, V extends Object>
|
||||
{
|
||||
public boolean contains(K key);
|
||||
|
||||
|
@ -73,7 +73,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Derek Hulley
|
||||
*/
|
||||
public class TransactionalCache<K extends Serializable, V extends Serializable>
|
||||
public class TransactionalCache<K extends Serializable, V extends Object>
|
||||
implements SimpleCache<K, V>, TransactionListener, InitializingBean
|
||||
{
|
||||
private static final String RESOURCE_KEY_TXN_DATA = "TransactionalCache.TxnData";
|
||||
@ -85,7 +85,7 @@ public class TransactionalCache<K extends Serializable, V extends Serializable>
|
||||
private String name;
|
||||
|
||||
/** the shared cache that will get updated after commits */
|
||||
private SimpleCache<Serializable, Serializable> sharedCache;
|
||||
private SimpleCache<Serializable, Object> sharedCache;
|
||||
|
||||
/** the manager to control Ehcache caches */
|
||||
private CacheManager cacheManager;
|
||||
@ -133,7 +133,7 @@ public class TransactionalCache<K extends Serializable, V extends Serializable>
|
||||
*
|
||||
* @param sharedCache
|
||||
*/
|
||||
public void setSharedCache(SimpleCache<Serializable, Serializable> sharedCache)
|
||||
public void setSharedCache(SimpleCache<Serializable, Object> sharedCache)
|
||||
{
|
||||
this.sharedCache = sharedCache;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user