1 6 package org.enhydra.dods.cache; 7 8 11 public class UpdateConfigurationAdministration { 12 13 17 public static synchronized ConfigurationAdministration setReserveFactor(ConfigurationAdministration confAdmin, double newValue) { 18 try { 19 confAdmin.setReserveFactor(newValue); 20 } catch (Exception ex) { 21 ex.printStackTrace(); 22 } 23 return confAdmin; 24 } 25 26 30 public static synchronized ConfigurationAdministration setCachePercentage(ConfigurationAdministration confAdmin, double newValue) { 31 try { 32 confAdmin.setCachePercentage(newValue); 33 } catch (Exception ex) { 34 ex.printStackTrace(); 35 } 36 return confAdmin; 37 } 38 39 43 public static synchronized CacheAdministration setMaxCacheSize(CacheAdministration cacheAdmin, int newValue) { 44 try { 45 cacheAdmin.setMaxCacheSize(newValue); 46 } catch (Exception ex) { 47 ex.printStackTrace(); 48 } 49 return cacheAdmin; 50 } 51 52 56 public static synchronized ConfigurationAdministration setInitialQueryCache(ConfigurationAdministration confAdmin, String newValue) { 57 try { 58 confAdmin.setInitialQueryCache(newValue); 59 } catch (Exception ex) { 60 ex.printStackTrace(); 61 } 62 return confAdmin; 63 } 64 65 69 public static synchronized TableConfiguration setReadOnly(TableConfiguration tableConf, boolean flag) { 70 try { 71 tableConf.setReadOnly(flag); 72 } catch (Exception ex) { 73 ex.printStackTrace(); 74 } 75 return tableConf; 76 } 77 78 82 public static synchronized TableConfiguration setLazyLoading(TableConfiguration tableConf, boolean flag) { 83 try { 84 tableConf.setLazyLoading(flag); 85 } catch (Exception ex) { 86 ex.printStackTrace(); 87 } 88 return tableConf; 89 } 90 91 95 public static synchronized TableConfiguration setMaxExecuteTime(TableConfiguration tableConf, int time) { 96 try { 97 tableConf.setMaxExecuteTime(time); 98 } catch (Exception ex) { 99 ex.printStackTrace(); 100 } 101 return tableConf; 102 } 103 } 104 | Popular Tags |