-
public interface CacheMethods<T extends Object>Interface defining methods for interacting with a cache.
-
-
Method Summary
Modifier and Type Method Description abstract Booleanadd(String key, T value)Adds an object to the cache. abstract Tget(String key)Retrieves an object from the cache. abstract Tremove(String key)Removes an object from the cache. abstract Unitempty()Clears the entire cache, removing all cached objects. abstract BooleanisEmpty()Checks if the cache is empty. -
-
Method Detail
-
add
abstract Boolean add(String key, T value)
Adds an object to the cache.
- Parameters:
key- The unique key associated with the object.value- The object to be cached.
-
get
abstract T get(String key)
Retrieves an object from the cache.
- Parameters:
key- The unique key associated with the object.
-
remove
abstract T remove(String key)
Removes an object from the cache.
- Parameters:
key- The unique key associated with the object.
-
-
-
-