|
|
@ -50,7 +50,7 @@ public class Config {
|
|
|
|
|
|
|
|
|
|
|
|
private ReplicatedServersConfig replicatedServersConfig;
|
|
|
|
private ReplicatedServersConfig replicatedServersConfig;
|
|
|
|
|
|
|
|
|
|
|
|
private ConnectionManager connectionManager;
|
|
|
|
private ConnectionManager connectionManager;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Threads amount shared between all redis node clients
|
|
|
|
* Threads amount shared between all redis node clients
|
|
|
@ -132,7 +132,7 @@ public class Config {
|
|
|
|
setReplicatedServersConfig(new ReplicatedServersConfig(oldConf.getReplicatedServersConfig()));
|
|
|
|
setReplicatedServersConfig(new ReplicatedServersConfig(oldConf.getReplicatedServersConfig()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (oldConf.getConnectionManager() != null) {
|
|
|
|
if (oldConf.getConnectionManager() != null) {
|
|
|
|
useCustomServers(oldConf.getConnectionManager());
|
|
|
|
useCustomServers(oldConf.getConnectionManager());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -236,27 +236,26 @@ public class Config {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the connection manager if supplied via
|
|
|
|
* Returns the connection manager if supplied via
|
|
|
|
* {@link #useCustomServers(ConnectionManager)}
|
|
|
|
* {@link #useCustomServers(ConnectionManager)}
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @return ConnectionManager
|
|
|
|
* @return ConnectionManager
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
ConnectionManager getConnectionManager() {
|
|
|
|
ConnectionManager getConnectionManager() {
|
|
|
|
return connectionManager;
|
|
|
|
return connectionManager;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This is an extension point to supply custom connection manager.
|
|
|
|
* This is an extension point to supply custom connection manager.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @see ReplicatedConnectionManager on how to implement a connection
|
|
|
|
* @see ReplicatedConnectionManager on how to implement a connection
|
|
|
|
* manager.
|
|
|
|
* manager.
|
|
|
|
* @param connectionManager for supply
|
|
|
|
* @param connectionManager for supply
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public void useCustomServers(ConnectionManager connectionManager) {
|
|
|
|
public void useCustomServers(ConnectionManager connectionManager) {
|
|
|
|
this.connectionManager = connectionManager;
|
|
|
|
this.connectionManager = connectionManager;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Init single server configuration.
|
|
|
|
* Init single server configuration.
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -415,6 +414,7 @@ public class Config {
|
|
|
|
this.transportMode = transportMode;
|
|
|
|
this.transportMode = transportMode;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public TransportMode getTransportMode() {
|
|
|
|
public TransportMode getTransportMode() {
|
|
|
|
return transportMode;
|
|
|
|
return transportMode;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -500,6 +500,7 @@ public class Config {
|
|
|
|
this.lockWatchdogTimeout = lockWatchdogTimeout;
|
|
|
|
this.lockWatchdogTimeout = lockWatchdogTimeout;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public long getLockWatchdogTimeout() {
|
|
|
|
public long getLockWatchdogTimeout() {
|
|
|
|
return lockWatchdogTimeout;
|
|
|
|
return lockWatchdogTimeout;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -519,6 +520,7 @@ public class Config {
|
|
|
|
this.keepPubSubOrder = keepPubSubOrder;
|
|
|
|
this.keepPubSubOrder = keepPubSubOrder;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isKeepPubSubOrder() {
|
|
|
|
public boolean isKeepPubSubOrder() {
|
|
|
|
return keepPubSubOrder;
|
|
|
|
return keepPubSubOrder;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -534,6 +536,7 @@ public class Config {
|
|
|
|
this.addressResolverGroupFactory = addressResolverGroupFactory;
|
|
|
|
this.addressResolverGroupFactory = addressResolverGroupFactory;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public AddressResolverGroupFactory getAddressResolverGroupFactory() {
|
|
|
|
public AddressResolverGroupFactory getAddressResolverGroupFactory() {
|
|
|
|
return addressResolverGroupFactory;
|
|
|
|
return addressResolverGroupFactory;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -713,6 +716,7 @@ public class Config {
|
|
|
|
this.useScriptCache = useScriptCache;
|
|
|
|
this.useScriptCache = useScriptCache;
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isUseScriptCache() {
|
|
|
|
public boolean isUseScriptCache() {
|
|
|
|
return useScriptCache;
|
|
|
|
return useScriptCache;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -720,6 +724,7 @@ public class Config {
|
|
|
|
public boolean isDecodeInExecutor() {
|
|
|
|
public boolean isDecodeInExecutor() {
|
|
|
|
return decodeInExecutor;
|
|
|
|
return decodeInExecutor;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Defines whether to decode data by <code>codec</code> in executor's threads or netty's threads.
|
|
|
|
* Defines whether to decode data by <code>codec</code> in executor's threads or netty's threads.
|
|
|
|
* If decoding data process takes long time and netty thread is used then `RedisTimeoutException` could arise time to time.
|
|
|
|
* If decoding data process takes long time and netty thread is used then `RedisTimeoutException` could arise time to time.
|
|
|
|