org.silverpeas.cache.service
Class ThreadCacheService

java.lang.Object
  extended by org.silverpeas.cache.service.AbstractSimpleCacheService
      extended by org.silverpeas.cache.service.ThreadCacheService
All Implemented Interfaces:
SimpleCacheService

public class ThreadCacheService
extends AbstractSimpleCacheService

User: Yohann Chastagnier Date: 25/10/13


Constructor Summary
ThreadCacheService()
           
 
Method Summary
 void clear()
          Clear the content of the cache.
 Object get(Object key)
          Gets an element from the cache.
protected  Map<Object,Object> getCache()
          Gets the cache.
 void put(Object key, Object value)
          Puts a value for a given key.
 Object remove(Object key)
          Removes an element from the cache and return it.
<T> T
remove(Object key, Class<T> classType)
          Removes a typed element from the cache and return it.
 
Methods inherited from class org.silverpeas.cache.service.AbstractSimpleCacheService
add, get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadCacheService

public ThreadCacheService()
Method Detail

getCache

protected Map<Object,Object> getCache()
Gets the cache.

Returns:

clear

public void clear()
Description copied from interface: SimpleCacheService
Clear the content of the cache.


get

public Object get(Object key)
Description copied from interface: SimpleCacheService
Gets an element from the cache.

Returns:

remove

public Object remove(Object key)
Description copied from interface: SimpleCacheService
Removes an element from the cache and return it.

Returns:

remove

public <T> T remove(Object key,
                    Class<T> classType)
Description copied from interface: SimpleCacheService
Removes a typed element from the cache and return it. Null is returned if an element exists for the given key but the object type doesn't correspond.

Returns:

put

public void put(Object key,
                Object value)
Description copied from interface: SimpleCacheService
Puts a value for a given key. After 12 hours without be used the value is trashed.



Copyright © 2016 Silverpeas. All Rights Reserved.