From 8ee3f781f42f91fd6b9eb14c64a9305b31fd4098 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Mon, 21 May 2007 08:45:46 +0000 Subject: [PATCH] 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 --- source/java/org/alfresco/repo/cache/EhCacheAdapter.java | 2 +- source/java/org/alfresco/repo/cache/NullCache.java | 2 +- source/java/org/alfresco/repo/cache/SimpleCache.java | 2 +- source/java/org/alfresco/repo/cache/TransactionalCache.java | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/java/org/alfresco/repo/cache/EhCacheAdapter.java b/source/java/org/alfresco/repo/cache/EhCacheAdapter.java index 41fac6a08d..f1bf82f816 100644 --- a/source/java/org/alfresco/repo/cache/EhCacheAdapter.java +++ b/source/java/org/alfresco/repo/cache/EhCacheAdapter.java @@ -44,7 +44,7 @@ import org.alfresco.error.AlfrescoRuntimeException; * * @author Derek Hulley */ -public class EhCacheAdapter +public class EhCacheAdapter implements SimpleCache { private net.sf.ehcache.Cache cache; diff --git a/source/java/org/alfresco/repo/cache/NullCache.java b/source/java/org/alfresco/repo/cache/NullCache.java index 22355f45fd..cf504716c1 100644 --- a/source/java/org/alfresco/repo/cache/NullCache.java +++ b/source/java/org/alfresco/repo/cache/NullCache.java @@ -37,7 +37,7 @@ import java.util.Collections; * * @author Derek Hulley */ -public class NullCache implements SimpleCache +public class NullCache implements SimpleCache { public NullCache() { diff --git a/source/java/org/alfresco/repo/cache/SimpleCache.java b/source/java/org/alfresco/repo/cache/SimpleCache.java index 299223881d..9b89701628 100644 --- a/source/java/org/alfresco/repo/cache/SimpleCache.java +++ b/source/java/org/alfresco/repo/cache/SimpleCache.java @@ -37,7 +37,7 @@ import java.util.Collection; * * @author Derek Hulley */ -public interface SimpleCache +public interface SimpleCache { public boolean contains(K key); diff --git a/source/java/org/alfresco/repo/cache/TransactionalCache.java b/source/java/org/alfresco/repo/cache/TransactionalCache.java index 45bd774373..1e9e8629a6 100644 --- a/source/java/org/alfresco/repo/cache/TransactionalCache.java +++ b/source/java/org/alfresco/repo/cache/TransactionalCache.java @@ -73,7 +73,7 @@ import org.springframework.util.Assert; * * @author Derek Hulley */ -public class TransactionalCache +public class TransactionalCache implements SimpleCache, TransactionListener, InitializingBean { private static final String RESOURCE_KEY_TXN_DATA = "TransactionalCache.TxnData"; @@ -85,7 +85,7 @@ public class TransactionalCache private String name; /** the shared cache that will get updated after commits */ - private SimpleCache sharedCache; + private SimpleCache sharedCache; /** the manager to control Ehcache caches */ private CacheManager cacheManager; @@ -133,7 +133,7 @@ public class TransactionalCache * * @param sharedCache */ - public void setSharedCache(SimpleCache sharedCache) + public void setSharedCache(SimpleCache sharedCache) { this.sharedCache = sharedCache; }