db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util/configuration/impl OjbConfiguration.java
Date Thu, 06 Mar 2003 00:20:08 GMT
arminw      2003/03/05 16:20:08

  Modified:    src/java/org/apache/ojb/broker/util/configuration/impl
                        OjbConfiguration.java
  Log:
  update for using CacheFilter
  
  Revision  Changes    Path
  1.22      +24 -1     db-ojb/src/java/org/apache/ojb/broker/util/configuration/impl/OjbConfiguration.java
  
  Index: OjbConfiguration.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/configuration/impl/OjbConfiguration.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- OjbConfiguration.java	19 Feb 2003 10:47:31 -0000	1.21
  +++ OjbConfiguration.java	6 Mar 2003 00:20:08 -0000	1.22
  @@ -81,6 +81,8 @@
   import org.apache.ojb.odmg.locking.LockingConfiguration;
   import org.apache.ojb.odmg.locking.PersistentLockMapImpl;
   
  +import java.util.List;
  +
   /**
    * This class contains the runtime configuration of the OJB
    * system. This Configuration is read in only once at application startup.
  @@ -102,6 +104,7 @@
       private String repositoryFilename;
       private String[] servers;
       private Class objectCacheClass;
  +    private String[] objectCacheFilter;
       private Class connectionFactoryClass;
       private Class loggerClass;
       private Class persistentFieldClass;
  @@ -212,6 +215,24 @@
           return objectCacheClass;
       }
   
  +    public String[] getCacheFilters()
  +    {
  +        if(objectCacheFilter == null || objectCacheFilter.length == 0)
  +        {
  +            return null;
  +        }
  +        else
  +            return objectCacheFilter;
  +    }
  +
  +    /**
  +     * Useful when writing test cases
  +     */
  +    public void setCacheFilters(String[] filters)
  +    {
  +        this.objectCacheFilter = filters;
  +    }
  +
       public Class getConnectionFactoryClass()
       {
           return connectionFactoryClass;
  @@ -265,6 +286,8 @@
   
           // load ObjectCache Class
           objectCacheClass = getClass("ObjectCacheClass", ObjectCacheDefaultImpl.class, ObjectCache.class);
  +        // load ObjectCache filters
  +        objectCacheFilter = getStrings("ObjectCacheFilter", "", ",");
   
           // load ConnectionFactory Class
           connectionFactoryClass =
  
  
  

Mime
View raw message