01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.storagemanager;
12:
13: import com.versant.core.common.State;
14: import com.versant.core.metadata.FetchGroup;
15: import com.versant.core.metadata.ClassMetaData;
16: import com.versant.core.metadata.ModelMetaData;
17: import com.versant.core.common.OID;
18: import com.versant.core.common.*;
19: import com.versant.core.server.CachedQueryResult;
20: import com.versant.core.server.CompiledQuery;
21:
22: /**
23: * Dummy StorageCache implementation.
24: */
25: public final class NOPStorageCache implements StorageCache {
26:
27: public NOPStorageCache() {
28: }
29:
30: public boolean isEnabled() {
31: return false;
32: }
33:
34: public boolean isQueryCacheEnabled() {
35: return false;
36: }
37:
38: public Object beginTx() {
39: return "NOPStorageCache";
40: }
41:
42: public void endTx(Object tx) {
43: }
44:
45: public State getState(OID oid, FetchGroup fetchGroup) {
46: return null;
47: }
48:
49: public boolean contains(OID oid) {
50: return false;
51: }
52:
53: public CachedQueryResult getQueryResult(CompiledQuery cq,
54: Object[] params) {
55: return null;
56: }
57:
58: public int getQueryResultCount(CompiledQuery cq, Object[] params) {
59: return 0;
60: }
61:
62: public void add(Object tx, StatesReturned container) {
63: }
64:
65: public void add(Object tx, CompiledQuery cq, Object[] params,
66: CachedQueryResult queryData) {
67: }
68:
69: public void add(Object tx, CompiledQuery cq, Object[] params,
70: int count) {
71: }
72:
73: public void evict(Object tx, OID[] oids, int offset, int length,
74: int expected) {
75: }
76:
77: public void evict(Object tx, ClassMetaData[] classes, int classCount) {
78: }
79:
80: public void evictAll(Object tx) {
81: }
82:
83: public void evict(Object tx, CompiledQuery cq, Object[] params) {
84: }
85:
86: public void setJDOMetaData(ModelMetaData jmd) {
87: }
88:
89: }
|