Interface CacheService


public interface CacheService
A cache service that will cache a connection object
  • Method Details

    • put

      void put(CacheKey key, ConnectionCache connectionCache) throws CacheException
      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 cache
      connectionCache - - 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

      void remove(CacheKey key)
      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