Class CloudCache


  • public abstract class CloudCache
    extends java.lang.Object
    This interface provides the method to use a simple cache.
    Author:
    javaito
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CloudCache​(java.lang.String cacheName, java.util.Set<CloudCacheStrategy> strategies)  
    • Method Summary

      Modifier and Type Method Description
      void add​(java.lang.Object id, java.lang.Object value)
      Add some information indexed by specific id onto the cloud cache implementation.
      <O> O get​(java.lang.Object id, java.lang.Class<? extends O> resultType)
      Return the information indexed by the specific id.
      java.lang.String getCacheName()
      Return the name of the cache.
      void remove​(java.lang.Object id)
      Remove the information associated to the specific id from the cache.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.