use of com.netflix.config.DynamicIntProperty in project java-chassis by ServiceComb.
the class ServiceRegistryConfigBuilder method getHeartBeatRequestTimeout.
// Set the timeout of the heartbeat request
public int getHeartBeatRequestTimeout() {
DynamicIntProperty property = DynamicPropertyFactory.getInstance().getIntProperty("servicecomb.service.registry.client.timeout.heartbeat", ServiceRegistryConfig.DEFAULT_REQUEST_HEARTBEAT_TIMEOUT_IN_MS);
int timeout = property.get();
return timeout < 1 ? ServiceRegistryConfig.DEFAULT_REQUEST_HEARTBEAT_TIMEOUT_IN_MS : timeout;
}
use of com.netflix.config.DynamicIntProperty in project java-chassis by ServiceComb.
the class ServiceRegistryConfigBuilder method getIdleWatchTimeout.
public int getIdleWatchTimeout() {
// watch idle timeout based on SC PING/PONG interval. SC default value is 30.
DynamicIntProperty property = DynamicPropertyFactory.getInstance().getIntProperty("servicecomb.service.registry.client.timeout.watch", ServiceRegistryConfig.DEFAULT_TIMEOUT_IN_SECONDS * 2);
int timeout = property.get();
return timeout < 1 ? ServiceRegistryConfig.DEFAULT_TIMEOUT_IN_SECONDS * 2 : timeout;
}
use of com.netflix.config.DynamicIntProperty in project java-chassis by ServiceComb.
the class ServiceRegistryConfigBuilder method getRequestTimeout.
public int getRequestTimeout() {
DynamicIntProperty property = DynamicPropertyFactory.getInstance().getIntProperty("servicecomb.service.registry.client.timeout.request", ServiceRegistryConfig.DEFAULT_REQUEST_TIMEOUT_IN_MS);
int timeout = property.get();
return timeout < 1 ? ServiceRegistryConfig.DEFAULT_REQUEST_TIMEOUT_IN_MS : timeout;
}
use of com.netflix.config.DynamicIntProperty in project java-chassis by ServiceComb.
the class ServiceRegistryConfigBuilder method getIdleConnectionTimeout.
public int getIdleConnectionTimeout() {
// connection pool idle timeout based on client heart beat interval. Heart beat default value is 30.
DynamicIntProperty property = DynamicPropertyFactory.getInstance().getIntProperty("servicecomb.service.registry.client.timeout.idle", ServiceRegistryConfig.DEFAULT_TIMEOUT_IN_SECONDS * 2);
int timeout = property.get();
return timeout < 1 ? ServiceRegistryConfig.DEFAULT_TIMEOUT_IN_SECONDS * 2 : timeout;
}
Aggregations