ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/componentmanager/ConfigurationCache.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/componentmanager/ConfigurationCache.java (file contents):
Revision 1.3 by tdb, Wed Mar 14 23:25:29 2001 UTC vs.
Revision 1.7 by tdb, Tue May 21 16:47:17 2002 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream central monitoring system
3 + * http://www.i-scream.org.uk
4 + * Copyright (C) 2000-2002 i-scream
5 + *
6 + * This program is free software; you can redistribute it and/or
7 + * modify it under the terms of the GNU General Public License
8 + * as published by the Free Software Foundation; either version 2
9 + * of the License, or (at your option) any later version.
10 + *
11 + * This program is distributed in the hope that it will be useful,
12 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 + * GNU General Public License for more details.
15 + *
16 + * You should have received a copy of the GNU General Public License
17 + * along with this program; if not, write to the Free Software
18 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19 + */
20 +
21   //---PACKAGE DECLARATION---
22 < package uk.org.iscream.componentmanager;
22 > package uk.org.iscream.cms.server.componentmanager;
23  
24   //---IMPORTS---
25 < import uk.org.iscream.core.*;
25 > import uk.org.iscream.cms.server.core.*;
26   import java.util.*;
27  
28   /**
29   * ConfigurationCache class
30 + * This is essentially a wrapper and cache for
31 + * Configuration CORBA objects.  The ConfigurationProxy creates an instance
32 + * of this class for every Configuration that is requested.  This class then
33 + * hold the reference to the configuration, but also maintains a cache where
34 + * the ConfigurationProxy can store cached property values to safe on CORBA
35 + * requests.
36   *
37   * @author  $Author$
38   * @version $Id$
# Line 27 | Line 53 | public class ConfigurationCache {
53      /**
54       * Construct a ConfigurationCache
55       *
56 +     * @param config a reference to the CORBA Configuration object this cache will hold
57 +     * @param propertyCache a hashMap to hold cached properties
58       */
59      public ConfigurationCache(Configuration config, HashMap propertyCache) {
60          _propertyCache = propertyCache;
# Line 39 | Line 67 | public class ConfigurationCache {
67  
68   //---ACCESSOR/MUTATOR METHODS---
69      
70 +    /**
71 +     * Obtins the hash containing cached
72 +     * configuration property values.
73 +     *
74 +     * @return the property cache
75 +     */
76      public HashMap getPropertyCache() {
77          return _propertyCache;
78      }
79      
80 +    /**
81 +     * Obtains the reference to the
82 +     * CORBA configuration object this
83 +     * cache holds.
84 +     *
85 +     * @return the configuration object
86 +     */
87      public Configuration getConfig() {
88          return _config;
89      }
90  
91 +    /**
92 +     * Sets this cache to hold a new CORBA
93 +     * Configuration object.
94 +     *
95 +     * @param config the new CORBA Configuration object
96 +     */
97      public void setConfig(Configuration config) {
98          _config = config;
99      }
100  
101 +    /**
102 +     * Sets this cache to hold a new property
103 +     * cache.
104 +     *
105 +     * @param propertyCache the new hash map to containing a property cache
106 +     */
107      public void setPropertyCache(HashMap propertyCache) {
108          _propertyCache = propertyCache;
109      }
110  
111   //---ATTRIBUTES---
112  
113 +    /**
114 +     * A hash that contains cached property values
115 +     */
116      private HashMap _propertyCache;
117 +    
118 +    /**
119 +     * The Configuration this configuration cache looks after
120 +     */
121      private Configuration _config;
122  
123   //---STATIC ATTRIBUTES---

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines