Package org.hcjf.cloud.cache
Class CloudCache
- java.lang.Object
-
- org.hcjf.cloud.cache.CloudCache
-
public abstract class CloudCache extends java.lang.ObjectThis interface provides the method to use a simple cache.- Author:
- javaito
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCloudCache(java.lang.String cacheName, java.util.Set<CloudCacheStrategy> strategies)
-
Method Summary
Modifier and Type Method Description voidadd(java.lang.Object id, java.lang.Object value)Add some information indexed by specific id onto the cloud cache implementation.<O> Oget(java.lang.Object id, java.lang.Class<? extends O> resultType)Return the information indexed by the specific id.java.lang.StringgetCacheName()Return the name of the cache.voidremove(java.lang.Object id)Remove the information associated to the specific id from the cache.
-
-
-
Constructor Detail
-
CloudCache
protected CloudCache(java.lang.String cacheName, java.util.Set<CloudCacheStrategy> strategies)
-
-
Method Detail
-
getCacheName
public final java.lang.String getCacheName()
Return the name of the cache.- Returns:
- Name of the cache.
-
remove
public final void remove(java.lang.Object id)
Remove the information associated to the specific id from the cache.- Parameters:
id- Information index.
-
add
public final void add(java.lang.Object id, java.lang.Object value)Add some information indexed by specific id onto the cloud cache implementation.- Parameters:
id- Information index.value- Information to put into cache.
-
get
public final <O> O get(java.lang.Object id, java.lang.Class<? extends O> resultType)Return the information indexed by the specific id.- Type Parameters:
O- Expected kind of information.- Parameters:
id- Information index.resultType- Result type.- Returns:
- Return the information associated to the specific id.
-
-