KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > storagemanager > NOPStorageCache


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.storagemanager;
13
14 import com.versant.core.common.State;
15 import com.versant.core.metadata.FetchGroup;
16 import com.versant.core.metadata.ClassMetaData;
17 import com.versant.core.metadata.ModelMetaData;
18 import com.versant.core.common.OID;
19 import com.versant.core.common.*;
20 import com.versant.core.server.CachedQueryResult;
21 import com.versant.core.server.CompiledQuery;
22
23 /**
24  * Dummy StorageCache implementation.
25  */

26 public final class NOPStorageCache implements StorageCache {
27
28     public NOPStorageCache() {
29     }
30
31     public boolean isEnabled() {
32         return false;
33     }
34
35     public boolean isQueryCacheEnabled() {
36         return false;
37     }
38
39     public Object JavaDoc beginTx() {
40         return "NOPStorageCache";
41     }
42
43     public void endTx(Object JavaDoc tx) {
44     }
45
46     public State getState(OID oid, FetchGroup fetchGroup) {
47         return null;
48     }
49
50     public boolean contains(OID oid) {
51         return false;
52     }
53
54     public CachedQueryResult getQueryResult(CompiledQuery cq, Object JavaDoc[] params) {
55         return null;
56     }
57
58     public int getQueryResultCount(CompiledQuery cq, Object JavaDoc[] params) {
59         return 0;
60     }
61
62     public void add(Object JavaDoc tx, StatesReturned container) {
63     }
64
65     public void add(Object JavaDoc tx,
66             CompiledQuery cq, Object JavaDoc[] params, CachedQueryResult queryData) {
67     }
68
69     public void add(Object JavaDoc tx, CompiledQuery cq, Object JavaDoc[] params, int count) {
70     }
71
72     public void evict(Object JavaDoc tx, OID[] oids, int offset, int length,
73             int expected) {
74     }
75
76     public void evict(Object JavaDoc tx, ClassMetaData[] classes, int classCount) {
77     }
78
79     public void evictAll(Object JavaDoc tx) {
80     }
81
82     public void evict(Object JavaDoc tx, CompiledQuery cq, Object JavaDoc[] params) {
83     }
84
85     public void setJDOMetaData(ModelMetaData jmd) {
86     }
87
88 }
89
90
Popular Tags