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:
Derek Hulley 2007-05-21 08:45:46 +00:00
parent 6cc8f52082
commit 8ee3f781f4
4 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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()
{

View File

@ -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);

View File

@ -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;
}