1 21 package net.sf.hajdbc; 22 23 import java.sql.SQLException ; 24 import java.util.Map ; 25 26 import java.util.concurrent.ExecutorService ; 27 import java.util.concurrent.locks.Lock ; 28 29 30 34 public interface DatabaseCluster extends DatabaseClusterMBean 35 { 36 41 public boolean activate(Database database); 42 43 48 public boolean deactivate(Database database); 49 50 54 public Map <Database, ?> getConnectionFactoryMap(); 55 56 61 public boolean isAlive(Database database); 62 63 69 public Database getDatabase(String id); 70 71 76 public String [] loadState() throws SQLException; 77 78 82 public SynchronizationStrategy getDefaultSynchronizationStrategy(); 83 84 91 public void handleFailure(Database database, SQLException cause) throws SQLException; 92 93 97 public Balancer getBalancer(); 98 99 104 public ExecutorService getTransactionalExecutor(); 105 106 111 public ExecutorService getNonTransactionalExecutor(); 112 113 118 public Dialect getDialect(); 119 120 125 public Lock readLock(); 126 127 132 public Lock writeLock(); 133 134 139 public void start() throws SQLException; 140 141 145 public void stop(); 146 } 147 | Popular Tags |