public class WeightBalancer extends AbstractBalancer
构造器和说明 |
---|
WeightBalancer() |
限定符和类型 | 方法和说明 |
---|---|
void |
afterDataSourceChanged(DataSourceChangedEvent event) |
void |
computeTotalWeight() |
MultiConnectionHolder |
getConnection(MultiDataSourceConnection conn,
String sql) |
int |
produceRandomNumber() |
getMultiDataSource, init, isInited
public void afterDataSourceChanged(DataSourceChangedEvent event)
public int produceRandomNumber()
public void computeTotalWeight()
public MultiConnectionHolder getConnection(MultiDataSourceConnection conn, String sql) throws SQLException
SQLException
Copyright © 2012 Alibaba Group. All Rights Reserved.