com.google.code.ssm.spring
Class SSMCache

java.lang.Object
  extended by com.google.code.ssm.spring.SSMCache
All Implemented Interfaces:
Cache

public class SSMCache
extends Object
implements Cache

Wrapper around Cache that allow to set default expiration time used in all put(Object, Object) ( Cache.set(String, int, Object, com.google.code.ssm.api.format.SerializationType)) requests.

Since:
3.0.0
Author:
Jakub BiaƂek

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.springframework.cache.Cache
Cache.ValueWrapper
 
Constructor Summary
SSMCache(Cache cache, int expiration)
           
SSMCache(Cache cache, int expiration, boolean allowClear)
           
SSMCache(Cache cache, int expiration, boolean allowClear, boolean registerAliases)
           
SSMCache(SSMCache ssmCache, int expiration)
           
 
Method Summary
 void clear()
           
 void evict(Object key)
           
 Cache.ValueWrapper get(Object key)
           
 Cache getCache()
           
 int getExpiration()
           
 String getName()
           
 Object getNativeCache()
           
 boolean isAllowClear()
           
 boolean isRegisterAliases()
          If true then all aliases of the underlying cache will be used to register the cache in Spring, otherwise the cache will be available only by name.
 void put(Object key, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSMCache

public SSMCache(Cache cache,
                int expiration,
                boolean allowClear,
                boolean registerAliases)

SSMCache

public SSMCache(Cache cache,
                int expiration,
                boolean allowClear)

SSMCache

public SSMCache(Cache cache,
                int expiration)

SSMCache

public SSMCache(SSMCache ssmCache,
                int expiration)
Method Detail

getName

public String getName()
Specified by:
getName in interface Cache

getNativeCache

public Object getNativeCache()
Specified by:
getNativeCache in interface Cache

get

public Cache.ValueWrapper get(Object key)
Specified by:
get in interface Cache

put

public void put(Object key,
                Object value)
Specified by:
put in interface Cache

evict

public void evict(Object key)
Specified by:
evict in interface Cache

clear

public void clear()
Specified by:
clear in interface Cache

getCache

public Cache getCache()

getExpiration

public int getExpiration()

isAllowClear

public boolean isAllowClear()

isRegisterAliases

public boolean isRegisterAliases()
If true then all aliases of the underlying cache will be used to register the cache in Spring, otherwise the cache will be available only by name.

Since:
3.3.0


Copyright © 2014. All rights reserved.