KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > dods > cache > UpdateConfigurationAdministration


1 /*
2  * @version 1.0.0.0
3  * @since Enhydra5.1
4  * @author Sinisa Milosevic
5  */

6 package org.enhydra.dods.cache;
7
8 /**
9  * Utility methods used by the cacheAdmin app.
10  */

11 public class UpdateConfigurationAdministration {
12
13     /**
14      *
15      *
16      **/

17     public static synchronized ConfigurationAdministration setReserveFactor(ConfigurationAdministration confAdmin, double newValue) {
18         try {
19             confAdmin.setReserveFactor(newValue);
20         } catch (Exception JavaDoc ex) {
21             ex.printStackTrace();
22         }
23         return confAdmin;
24     }
25     
26     /**
27      *
28      *
29      **/

30     public static synchronized ConfigurationAdministration setCachePercentage(ConfigurationAdministration confAdmin, double newValue) {
31         try {
32             confAdmin.setCachePercentage(newValue);
33         } catch (Exception JavaDoc ex) {
34             ex.printStackTrace();
35         }
36         return confAdmin;
37     }
38
39     /**
40      *
41      *
42      **/

43     public static synchronized CacheAdministration setMaxCacheSize(CacheAdministration cacheAdmin, int newValue) {
44         try {
45             cacheAdmin.setMaxCacheSize(newValue);
46         } catch (Exception JavaDoc ex) {
47             ex.printStackTrace();
48         }
49         return cacheAdmin;
50     }
51    
52     /**
53      *
54      *
55      **/

56     public static synchronized ConfigurationAdministration setInitialQueryCache(ConfigurationAdministration confAdmin, String JavaDoc newValue) {
57         try {
58             confAdmin.setInitialQueryCache(newValue);
59         } catch (Exception JavaDoc ex) {
60             ex.printStackTrace();
61         }
62         return confAdmin;
63     }
64  
65     /**
66      *
67      *
68      **/

69     public static synchronized TableConfiguration setReadOnly(TableConfiguration tableConf, boolean flag) {
70         try {
71             tableConf.setReadOnly(flag);
72         } catch (Exception JavaDoc ex) {
73             ex.printStackTrace();
74         }
75         return tableConf;
76     }
77
78     /**
79      *
80      *
81      **/

82     public static synchronized TableConfiguration setLazyLoading(TableConfiguration tableConf, boolean flag) {
83         try {
84             tableConf.setLazyLoading(flag);
85         } catch (Exception JavaDoc ex) {
86             ex.printStackTrace();
87         }
88         return tableConf;
89     }
90
91     /**
92      *
93      *
94      **/

95     public static synchronized TableConfiguration setMaxExecuteTime(TableConfiguration tableConf, int time) {
96         try {
97             tableConf.setMaxExecuteTime(time);
98         } catch (Exception JavaDoc ex) {
99             ex.printStackTrace();
100         }
101         return tableConf;
102     }
103 }
104
Popular Tags