1 23 package com.lutris.appserver.server.sql; 24 25 import java.sql.SQLException ; 26 import java.util.Date ; 27 import com.lutris.util.Config; 28 29 36 public interface DatabaseManager { 37 38 41 boolean debug = false; 42 43 49 public Config getConfig(); 50 51 66 public DBConnection allocateConnection(String dbName) 67 throws DatabaseManagerException, SQLException ; 68 69 84 public DBConnection allocateConnection() 85 throws DatabaseManagerException, SQLException ; 86 87 98 public ObjectId allocateObjectId(String dbName) 99 throws DatabaseManagerException, ObjectIdException; 100 101 112 public ObjectId allocateObjectId() 113 throws DatabaseManagerException, ObjectIdException; 114 115 127 public void checkOId(String dbName, ObjectId oid) 128 throws DatabaseManagerException, ObjectIdException; 129 130 140 public void checkOId(ObjectId oid) 141 throws DatabaseManagerException, ObjectIdException; 142 143 154 public DBTransaction createTransaction(String dbName) 155 throws DatabaseManagerException, SQLException ; 156 157 168 public DBTransaction createTransaction() 169 throws DatabaseManagerException, SQLException ; 170 171 182 public DBQuery createQuery(String dbName) 183 throws DatabaseManagerException, SQLException ; 184 185 196 public DBQuery createQuery() 197 throws DatabaseManagerException, SQLException ; 198 199 212 public String logicalDatabaseType(String dbName) 213 throws DatabaseManagerException, SQLException ; 214 215 226 public String logicalDatabaseType() 227 throws DatabaseManagerException, SQLException ; 228 229 238 public void setDefaultDatabase(String dbName) 239 throws DatabaseManagerException; 240 241 246 public String getDefaultDB(); 247 248 252 public void shutdown(); 253 261 public String [] getLogicalDatabaseNames(); 262 263 273 public String getType(String dbName) 274 throws DatabaseManagerException; 275 276 286 public long getRequestCount(String dbName) 287 throws DatabaseManagerException; 288 289 301 public int getActiveConnectionCount(String dbName) 302 throws DatabaseManagerException; 303 304 318 public int getMaxConnectionCount(String dbName) 319 throws DatabaseManagerException; 320 321 333 public Date getMaxConnectionCountDate(String dbName) 334 throws DatabaseManagerException; 335 336 346 public void resetMaxConnectionCount(String dbName) 347 throws DatabaseManagerException; 348 349 public LogicalDatabase findLogicalDatabase(String dbName) 350 throws DatabaseManagerException; 351 } 352 | Popular Tags |