1 2 12 package com.versant.core.storagemanager; 13 14 import com.versant.core.common.State; 15 import com.versant.core.server.CompiledQuery; 16 import com.versant.core.jdo.QueryDetails; 17 import com.versant.core.jdo.VersantQueryPlan; 18 import com.versant.core.metadata.ClassMetaData; 19 import com.versant.core.metadata.FetchGroup; 20 import com.versant.core.metadata.FieldMetaData; 21 import com.versant.core.common.OID; 22 import com.versant.core.common.OIDArray; 23 import com.versant.core.common.*; 24 25 import java.util.Map ; 26 27 42 public interface StorageManager { 43 44 45 public static final int CON_POLICY_RELEASE = 1; 46 47 public static final int CON_POLICY_PIN_FOR_TX = 2; 48 49 public static final int CON_POLICY_PIN = 3; 50 51 52 public static final int LOCK_POLICY_NONE = 1; 53 54 public static final int LOCK_POLICY_FIRST = 2; 55 56 public static final int LOCK_POLICY_ALL = 3; 57 58 59 public static final int STORE_OPTION_FLUSH = 1; 60 61 public static final int STORE_OPTION_PREPARE = 2; 62 63 public static final int STORE_OPTION_COMMIT = 3; 64 65 public static final int EVENT_ERRORS = 1; 66 public static final int EVENT_NORMAL = 2; 67 public static final int EVENT_VERBOSE = 3; 68 public static final int EVENT_ALL = 4; 69 70 73 public void begin(boolean optimistic); 74 75 83 public void commit(); 84 85 88 public void rollback(); 89 90 98 public void setConnectionPolicy(int policy); 99 100 108 public void setLockingPolicy(int policy); 109 110 113 public int getLockingPolicy(); 114 115 120 public StatesReturned fetch(ApplicationContext context, OID oid, State current, 121 FetchGroup fetchGroup, FieldMetaData triggerField); 122 123 129 public StatesReturned fetch(ApplicationContext context, OIDArray oids, 130 FieldMetaData triggerField); 131 132 147 public StatesReturned store(StatesToStore toStore, DeletePacket toDelete, 148 boolean returnFieldsUpdatedBySM, int storeOption, 149 boolean evictClasses); 150 151 157 public OID createOID(ClassMetaData cmd); 158 159 163 public CompiledQuery compileQuery(QueryDetails query); 164 165 171 public ExecuteQueryReturn executeQuery(ApplicationContext context, 172 QueryDetails query, CompiledQuery compiledQuery, Object [] params); 173 174 178 public QueryResultContainer executeQueryAll(ApplicationContext context, 179 QueryDetails query, CompiledQuery compiledQuery, Object [] params); 180 181 185 public int executeQueryCount(QueryDetails query, 186 CompiledQuery compiledQuery, Object [] params); 187 188 192 public VersantQueryPlan getQueryPlan(QueryDetails query, 193 CompiledQuery compiledQuery, Object [] params); 194 195 198 public QueryResultContainer fetchNextQueryResult(ApplicationContext context, 199 RunningQuery runningQuery, int skipAmount); 200 201 204 public QueryResultContainer fetchRandomAccessQueryResult( 205 ApplicationContext context, RunningQuery runningQuery, int index, 206 int fetchAmount); 207 208 211 public int getRandomAccessQueryCount(ApplicationContext context, 212 RunningQuery runningQuery); 213 214 217 public void closeQuery(RunningQuery runningQuery); 218 219 225 public Object getDatastoreConnection(); 226 227 233 public boolean isNotifyDirty(); 234 235 240 public void notifyDirty(OID oid); 241 242 245 public void reset(); 246 247 252 public void destroy(); 253 254 257 public void logEvent(int level, String description, int ms); 258 259 262 public StorageManager getInnerStorageManager(); 263 264 267 public boolean hasDatastoreConnection(); 268 269 272 public Map getStatus(); 273 274 277 public void setUserObject(Object o); 278 } 279 280 281 | Popular Tags |