Constructor and Description |
---|
MongoFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
closeAll()
关闭全部连接
|
static MongoDS |
getDS(Collection<String> groups)
获取MongoDB数据源
|
static MongoDS |
getDS(Setting setting,
Collection<String> groups)
获取MongoDB数据源
|
static MongoDS |
getDS(Setting setting,
String... groups)
获取MongoDB数据源
|
static MongoDS |
getDS(String... groups)
获取MongoDB数据源
多个分组名对应的连接组成集群 |
static MongoDS |
getDS(String host,
int port)
获取MongoDB数据源
|
public static MongoDS getDS(String host, int port)
host
- 主机port
- 端口public static MongoDS getDS(String... groups)
groups
- 分组列表public static MongoDS getDS(Collection<String> groups)
groups
- 分组列表public static MongoDS getDS(Setting setting, String... groups)
setting
- 设定文件groups
- 分组列表public static MongoDS getDS(Setting setting, Collection<String> groups)
setting
- 配置文件groups
- 分组列表public static void closeAll()
Copyright © 2024. All rights reserved.