1 2 12 package com.versant.core.jdo; 13 14 import com.versant.core.logging.LogEvent; 15 import com.versant.core.metric.Metric; 16 import com.versant.core.metric.MetricSnapshotPacket; 17 import com.versant.core.server.DataStoreInfo; 18 19 import javax.jdo.PersistenceManagerFactory; 20 import java.sql.Connection ; 21 import java.sql.SQLException ; 22 import java.util.Collection ; 23 import java.util.List ; 24 25 31 public interface VersantPersistenceManagerFactory 32 extends PersistenceManagerFactory { 33 34 public static final String PROP_DRIVER_NAME = "javax.jdo.option.ConnectionDriverName"; 35 public static final String PROP_USER_NAME = "javax.jdo.option.ConnectionUserName"; 36 public static final String PROP_PASSWORD = "javax.jdo.option.ConnectionPassword"; 37 public static final String PROP_URL = "javax.jdo.option.ConnectionURL"; 38 public static final String PROP_FACTORY_NAME = "javax.jdo.option.ConnectionFactoryName"; 39 public static final String PROP_FACTORY2_NAME = "javax.jdo.option.ConnectionFactory2Name"; 40 41 public static final int EVENT_ERRORS = 1; 42 public static final int EVENT_NORMAL = 2; 43 public static final int EVENT_VERBOSE = 3; 44 public static final int EVENT_ALL = 4; 45 46 56 public Connection getJdbcConnection(String datastore) 57 throws SQLException ; 58 59 68 public void clearConnectionPool(String datastore); 69 70 80 public void setUserObject(Object o); 81 82 87 public Object getUserObject(); 88 89 94 public boolean isInterceptDfgFieldAccess(); 95 96 101 public void setInterceptDfgFieldAccess(boolean interceptDfgFieldAccess); 102 103 109 public boolean isAllowPmCloseWithTxOpen(); 110 111 115 public void setAllowPmCloseWithTxOpen(boolean allowed); 116 117 124 public boolean isCheckModelConsistencyOnCommit(); 125 126 135 public void setCheckModelConsistencyOnCommit(boolean on); 136 137 146 public void setServerUserObject(Object o); 147 148 160 public Object getServerUserObject(); 161 162 165 public void shutdown(); 166 167 171 public LogEvent[] getNewPerfEvents(int lastId); 172 173 177 public PmfStatus getPmfStatus(); 178 179 184 public Metric[] getMetrics(); 185 186 194 public MetricSnapshotPacket getNewMetricSnapshots(int lastId); 195 196 204 public MetricSnapshotPacket getMostRecentMetricSnapshot(int lastId); 205 206 211 public void setUserMetric(String name, int value); 212 213 218 public void incUserMetric(String name, int delta); 219 220 225 public int getUserMetric(String name); 226 227 238 public void logEvent(int level, String description, int ms); 239 240 244 public void doSystemGC(); 245 246 250 public PropertyInfo getServerConfiguration(); 251 252 262 public String setServerProperty(String [] beanPath, String value); 263 264 267 public RemoteClientStatus[] getRemoteClients(); 268 269 272 public List getPersistenceManagers(); 273 274 280 public void evict(Object oid); 281 282 287 public void evictAll(Object [] oids); 288 289 294 public void evictAll(Collection oids); 295 296 304 public void evictAll(Class cls, boolean includeSubclasses); 305 306 309 public void evictAll(); 310 311 315 public boolean isInCache(Object oid); 316 317 327 public int getClassID(Class cls); 328 329 337 public Class getClassForID(int classid); 338 339 350 public Object getJdbcClassID(Class cls); 351 352 361 public Class getClassForJdbcID(Class baseClass, Object jdbcClassid); 362 363 374 public int getClassIndex(Class cls); 375 376 384 public Class getClassForIndex(int index); 385 386 391 public int[] getClassIndexes(Class [] classes, boolean includeSubclasses); 392 393 399 public void registerSCOPersistenceDelegates(Object encoder); 400 401 409 public int getPmCacheRefType(); 410 411 421 public void setPmCacheRefType(int pmCacheRefType); 422 423 428 public DataStoreInfo getDataStoreInfo(String datastore); 429 430 441 public void addLifecycleListener(LifecycleListener listener, 442 Class [] classes); 443 444 449 public void removeLifecycleListener(LifecycleListener listener); 450 451 452 455 public Object getEntityManagerFactory(); 456 457 } 458 | Popular Tags |