类 MongoDataSourceHolder
java.lang.Object
org.anyline.data.datasource.init.AbstractDataSourceHolder
org.anyline.data.mongodb.datasource.MongoDataSourceHolder
- 所有已实现的接口:
DataSourceHolder
@Component("anyline.environment.data.datasource.holder.mongo")
public class MongoDataSourceHolder
extends AbstractDataSourceHolder
implements DataSourceHolder
-
字段概要
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明create(String key, Connection connection, boolean override) create(String key, org.anyline.metadata.type.DatabaseType database, String url, String user, String password) 根据params与配置文件创建数据源, 同时注入到spring上下文根据params创建数据源, 同时注入到spring上下文static MongoDataSourceHolderinstance()regTransactionManager(String key, com.mongodb.client.MongoClient client, com.mongodb.client.MongoDatabase database, boolean primary) regTransactionManager(String key, DataSource datasource, boolean primary) runtime(String key, Object datasource, String database, org.anyline.metadata.type.DatabaseType type, DriverAdapter adapter, boolean override) booleanvalidate(DataRuntime runtime) 从类继承的方法 org.anyline.data.datasource.init.AbstractDataSourceHolder
value, value, value, value从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.anyline.data.datasource.DataSourceHolder
create, create, create, create, create, create, create, create, create, regTransactionManager, regTransactionManager, regTransactionManager, runtime, validate, validate, value, value
-
构造器详细资料
-
MongoDataSourceHolder
public MongoDataSourceHolder()
-
-
方法详细资料
-
instance
-
reg
-
create
public String create(String key, org.anyline.metadata.type.DatabaseType database, String url, String user, String password) throws Exception - 指定者:
create在接口中DataSourceHolder- 抛出:
Exception
-
create
- 指定者:
create在接口中DataSourceHolder
-
create
- 指定者:
create在接口中DataSourceHolder
-
validate
- 指定者:
validate在接口中DataSourceHolder- 抛出:
Exception
-
regTransactionManager
- 指定者:
regTransactionManager在接口中DataSourceHolder
-
regTransactionManager
-
runtime
- 指定者:
runtime在接口中DataSourceHolder- 抛出:
Exception
-
runtime
public DataRuntime runtime(String key, Object datasource, String database, org.anyline.metadata.type.DatabaseType type, DriverAdapter adapter, boolean override) throws Exception - 指定者:
runtime在接口中DataSourceHolder- 抛出:
Exception
-
inject
根据params创建数据源, 同时注入到spring上下文- 指定者:
inject在接口中DataSourceHolder- 参数:
key- 调用或注销数据源时需要用到 如ServiceProxy.service(key)params- 帐号密码等参数- 返回:
- bean.id
- 抛出:
Exception- Exception
-
inject
public String inject(String key, String prefix, Map<String, Object> params, boolean override) throws Exception根据params与配置文件创建数据源, 同时注入到spring上下文- 指定者:
inject在接口中DataSourceHolder- 参数:
key- 调用或注销数据源时需要用到 如ServiceProxy.service(“sso”)prefix- 配置文件前缀 如 anyline.datasource.ssoparams- map格式参数override- 是否覆盖同名数据源- 返回:
- bean.di
- 抛出:
Exception- Exception
-