String address = ConfigurationHelper.getString(CacheEnvironment.NATIVE_CLIENT_ADDRESS, props, null);
String group = ConfigurationHelper.getString(CacheEnvironment.NATIVE_CLIENT_GROUP, props, null);
String pass = ConfigurationHelper.getString(CacheEnvironment.NATIVE_CLIENT_PASSWORD, props, null);
String configResourcePath = CacheEnvironment.getConfigFilePath(props);
ClientConfig clientConfig = buildClientConfig(configResourcePath);
if (group != null) {
clientConfig.getGroupConfig().setName(group);
}
if (pass != null) {
clientConfig.getGroupConfig().setPassword(pass);
}
if (address != null) {
clientConfig.getNetworkConfig().addAddress(address);
}
clientConfig.getNetworkConfig().setSmartRouting(true);
clientConfig.getNetworkConfig().setRedoOperation(true);
client = HazelcastClient.newHazelcastClient(clientConfig);
return client;
}