1 20 package org.enhydra.dods.cache; 21 22 import java.util.Vector ; 23 24 34 public abstract class QueryCache extends DataStructCache { 35 36 42 public abstract QueryCacheItem newQueryCacheItemInstance(String dbName); 43 44 52 public abstract QueryCacheItem getSimpleQueryCacheItem(String dbName, String query); 53 54 62 public abstract QueryCacheItem getComplexQueryCacheItem(String dbName, String query); 63 64 72 public abstract QueryCacheItem getMultiJoinQueryCacheItem(String dbName, String query); 73 74 80 public abstract QueryCacheItem addSimpleQuery(QueryCacheItem queryItem); 81 82 88 public abstract QueryCacheItem removeSimpleQuery(QueryCacheItem queryItem); 89 90 96 public abstract QueryCacheItem addComplexQuery(QueryCacheItem queryItem); 97 98 104 public abstract QueryCacheItem removeComplexQuery(QueryCacheItem queryItem); 105 106 112 public abstract QueryCacheItem addMultiJoinQuery(QueryCacheItem queryItem); 113 114 120 public abstract QueryCacheItem removeMultiJoinQuery(QueryCacheItem queryItem); 121 122 130 public abstract QueryResult getSimpleQueryResults(String dbName, String query); 131 132 142 public abstract QueryResult getSimpleQueryResults(String dbName, String query, int limit, int maxdb); 143 144 155 public abstract QueryResult getSimpleQueryResults(String dbName, String query, int limit, int maxdb, boolean unique); 156 157 165 public abstract QueryResult getComplexQueryResults(String dbName, String query); 166 167 177 public abstract QueryResult getComplexQueryResults(String dbName, String query, int limit, int maxdb); 178 179 190 public abstract QueryResult getComplexQueryResults(String dbName, String query, int limit, int maxdb, boolean unique); 191 192 200 public abstract QueryResult getMultiJoinQueryResults(String dbName, String query); 201 202 212 public abstract QueryResult getMultiJoinQueryResults(String dbName, String query, int limit, int maxdb); 213 214 225 public abstract QueryResult getMultiJoinQueryResults(String dbName, String query, int limit, int maxdb, boolean unique); 226 227 236 public abstract QueryResult getQueryResults(String dbName, String query); 237 238 241 final synchronized void lockSimpleComplexQCache() { 242 lockedSimpleComplexQCache = true; 243 } 244 245 248 final synchronized void unlockSimpleComplexQCache() { 249 lockedSimpleComplexQCache = false; 250 } 251 252 255 protected final synchronized boolean isLockedSimpleComplexQCache() { 256 return lockedSimpleComplexQCache; 257 } 258 259 262 final synchronized void lockMultiJoinQCache() { 263 lockedMultiJoinQCache = true; 264 } 265 266 269 final synchronized void unlockMultiJoinQCache() { 270 lockedMultiJoinQCache = false; 271 } 272 273 276 protected final synchronized boolean isLockedMultiJoinQCache() { 277 return lockedMultiJoinQCache; 278 } 279 280 283 public abstract void removeEntries(Vector vec); 284 285 288 public abstract void removeEntries() ; 289 290 293 public abstract void emptyEntries(Vector vec, boolean incrementVersion) ; 294 295 298 public abstract void emptyEntries() ; 299 300 303 public abstract void makeInvisible(String cacheHandle) ; 304 305 306 309 public abstract void makeVisible(String cacheHandle); 310 311 312 public abstract CacheAdministration getCacheAdministration(int cacheType); 313 314 317 private boolean lockedSimpleComplexQCache = false; 318 319 322 private boolean lockedMultiJoinQCache = false; 323 } 324 | Popular Tags |