You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by hc...@apache.org on 2005/01/19 11:58:39 UTC

cvs commit: jakarta-turbine-jcs/auxiliary-builds/jdk15/yajcache/cache/src/net/sf/yajcache/core ICache.java ICacheSafe.java

hchar       2005/01/19 02:58:38

  Added:       auxiliary-builds/jdk15/yajcache/cache/src/net/sf/yajcache/core
                        ICache.java ICacheSafe.java
  Log:
  no message
  
  Revision  Changes    Path
  1.1                  jakarta-turbine-jcs/auxiliary-builds/jdk15/yajcache/cache/src/net/sf/yajcache/core/ICache.java
  
  Index: ICache.java
  ===================================================================
  /*
   * ICache.java
   *
   * Created on 17 January 2005, 05:05
   */
  
  package net.sf.yajcache.core;
  
  import java.util.Map;
  
  
  
  /**
   * Interface of a Cache.
   *
   * @author Hanson Char
   */
  public interface ICache<V> extends Map<String,V> {
      /** Returns the cache name. */
      public String getName();
      /** Returns the value type of the cached items. */
      public Class<V> getValueType();
      /** Returns the value cached for the specified key. */
      public V get(String key);
  }
  
  
  
  1.1                  jakarta-turbine-jcs/auxiliary-builds/jdk15/yajcache/cache/src/net/sf/yajcache/core/ICacheSafe.java
  
  Index: ICacheSafe.java
  ===================================================================
  /*
   * ICacheSafe.java
   *
   * $Revision: 1.1 $ $Date: 2005/01/19 10:58:38 $
   */
  
  package net.sf.yajcache.core;
  
  import java.util.Map;
  
  /**
   *
   * @author Hanson Char
   */
  public interface ICacheSafe<V> extends ICache<V> {
      /**
       * If the cache value is Serializable, returns a deep clone copy of
       * the cached value.  Else, the behavior is the same as get.
       */
      public V getCopy(String key);
      /**
       * If the cache value is Serializable, puts a deep clone copy of
       * the given value to the cache.  Else, the behavior is the same as put.
       */
      public V putCopy(String key, V value);
      /**
       * If the cache value is Serializable, puts the deep clone copies of
       * the given values to the cache.  Else, the behavior is the same as putAll.
       */
      public void putAllCopies(Map<? extends String, ? extends V> map);
      /**
       * Treats the cache value as a Java Bean and returns a deep clone copy of
       * the cached value.
       */
      public V getBeanCopy(String key);
      /**
       * Treats the cache value as a Java Bean and puts a deep clone copy of
       * the given value to the cache.
       */
      public V putBeanCopy(String key, V value);
      /**
       * Treats the cache value as a Java Bean and puts the deep clone copies of
       * the given values to the cache.
       */
      public void putAllBeanCopies(Map<? extends String, ? extends V> map);
      /**
       * Treats the cache value as a Java Bean and returns a shallow clone copy of
       * the cached value.
       */
      public V getBeanClone(String key);
      /**
       * Treats the cache value as a Java Bean and puts a shallow clone copy of
       * the given value to the cache.
       */
      public V putBeanClone(String key, V value);
      /**
       * Treats the cache value as a Java Bean and puts the shallow clone copies of
       * the given values to the cache.
       */
      public void putAllBeanClones(Map<? extends String, ? extends V> map);
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org