public class NullCacheImplementation extends java.lang.Object implements Cache
Cache
that does nothing.
This class is included for completeness, all methods are stubs and it is simply designed to provide default behaviour in the event of misconfiguration.
In the adapter configuration file this class is aliased as null-cache-implementation which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
NullCacheImplementation() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all entries from the cache (optional operation).
|
java.lang.Object |
get(java.lang.String key)
Retrieves an object from the cache
|
java.util.List<java.lang.String> |
getKeys()
Retrieves a List of all the keys in the cache (optional operation).
|
void |
put(java.lang.String key,
java.lang.Object value)
Puts any object into the cache (optional operation).
|
void |
put(java.lang.String key,
java.lang.Object value,
long ttl)
Puts an object into the cache, specifying a expiration (optional operation).
|
void |
put(java.lang.String key,
java.io.Serializable value)
Puts a serializable object into the cache.
|
void |
put(java.lang.String key,
java.io.Serializable value,
long ttl)
Puts a serializable object into the cache, specifying a expiration (optional operation).
|
void |
remove(java.lang.String key)
Removes an object from the cache.
|
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, init, start, stop
public void put(java.lang.String key, java.io.Serializable value)
Cache
public void put(java.lang.String key, java.lang.Object value)
Cache
Not guaranteed to be supported by all cache implementations as some persistent caches require serialization.
public java.lang.Object get(java.lang.String key)
Cache
public void remove(java.lang.String key)
Cache
public java.util.List<java.lang.String> getKeys()
Cache
public void clear()
Cache
public int size()
public void put(java.lang.String key, java.io.Serializable value, long ttl)
Cache
Since JSR107 doesn't define per item cache expiry; this may not be supported by all cache implementations.
public void put(java.lang.String key, java.lang.Object value, long ttl)
Cache
Since JSR107 doesn't define per item cache expiry; this may not be supported by all cache implementations.