com.spoledge.audao.db.dao.gae
Class ExpiringMemcacheDtoCacheImpl<K,V>
java.lang.Object
com.spoledge.audao.db.dao.gae.MemcacheDtoCacheImpl<K,V>
com.spoledge.audao.db.dao.gae.ExpiringMemcacheDtoCacheImpl<K,V>
- All Implemented Interfaces:
- DtoCache<K,V>
public class ExpiringMemcacheDtoCacheImpl<K,V>
- extends MemcacheDtoCacheImpl<K,V>
Expiring variant of the Memcache DtoCache.
Since teh MemcacheService distinguishes between seconds or milliseconds expiration
periods, we truncate any period longer than 60000 millis (= 1 minute) to seconds.
Method Summary |
void |
put(K key,
V value)
Puts the key/value pair into the cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expireMillis
protected int expireMillis
expireSecs
protected int expireSecs
isSecs
protected boolean isSecs
ExpiringMemcacheDtoCacheImpl
public ExpiringMemcacheDtoCacheImpl(long expireMillis)
- Creates anonymous memcache instance.
ExpiringMemcacheDtoCacheImpl
public ExpiringMemcacheDtoCacheImpl(long expireMillis,
java.lang.String name)
- Creates named memcache instance.
The full namespace is set as:
DEFAULT_NAMESPACE_PREFIX + name
.
This is used for generated DAO implementation classes.
ExpiringMemcacheDtoCacheImpl
public ExpiringMemcacheDtoCacheImpl(long expireMillis,
java.lang.String namespacePrefix,
java.lang.String namespaceSuffix)
- Creates named memcache instance.
put
public void put(K key,
V value)
- Puts the key/value pair into the cache.
- Specified by:
put
in interface DtoCache<K,V>
- Overrides:
put
in class MemcacheDtoCacheImpl<K,V>
Copyright © 2010 Spolecne s.r.o. All Rights Reserved.