net.ymate.platform.persistence.redis.IRedisModuleCfg Maven / Gradle / Ivy
/*
* Copyright 2007-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.ymate.platform.persistence.redis;
import java.util.Map;
/**
* @author 刘镇 ([email protected]) on 15/11/30 上午3:18
* @version 1.0
*/
public interface IRedisModuleCfg {
String getDataSourceDefaultName();
Map getDataSourceCfgs();
RedisDataSourceCfgMeta getDefaultDataSourceCfg();
RedisDataSourceCfgMeta getDataSourceCfg(String name);
class ServerMeta {
private String name;
private String host;
private int port;
private int timeout;
private int weight;
private int database;
private String clientName;
private String password;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public int getTimeout() {
return timeout;
}
public void setTimeout(int timeout) {
this.timeout = timeout;
}
public int getWeight() {
return weight;
}
public void setWeight(int weight) {
this.weight = weight;
}
public int getDatabase() {
return database;
}
public void setDatabase(int database) {
this.database = database;
}
public String getClientName() {
return clientName;
}
public void setClientName(String clientName) {
this.clientName = clientName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
}