Package com.firebolt.jdbc.cache
Interface CacheService
public interface CacheService
A cache service that will cache a connection object
-
Method Summary
Modifier and TypeMethodDescriptionReturns the object from the cache.void
put
(CacheKey key, ConnectionCache connectionCache) Saves an entry in the cache.void
Removes an entry from the cache if it exists.
-
Method Details
-
put
Saves an entry in the cache. If there already is an entry for that key it will be overwritten- Parameters:
key
- - the key associated with the value to be saved in the cacheconnectionCache
- - the value to be saved in the cache- Throws:
CacheException
- - if there is a problem talking to the cache
-
get
Returns the object from the cache. If the cache is not present then an empty value will be returned. If there is a problem accessing the cache a cacheException will be thrown- Parameters:
key
- - the key for which the client is trying to retrive the associated saved value- Returns:
- Throws:
CacheException
- - if there is a problem talking to the cache
-
remove
Removes an entry from the cache if it exists. If there is no entry with the specified key, then it will be a no-op- Parameters:
key
- - the key to be removed
-