use of com.netflix.config.DynamicIntProperty in project java-chassis by ServiceComb.
the class ServiceRegistryConfig method getResendHeartBeatTimes.
public int getResendHeartBeatTimes() {
DynamicIntProperty property = DynamicPropertyFactory.getInstance().getIntProperty("cse.service.registry.instance.healthCheck.times", DEFAULT_CHECK_TIMES);
int times = property.get();
return times < 0 ? DEFAULT_CHECK_TIMES : times;
}
use of com.netflix.config.DynamicIntProperty in project incubator-servicecomb-java-chassis by apache.
the class ServiceRegistryConfig method getHeartBeatRequestTimeout.
// Set the timeout of the heartbeat request
public int getHeartBeatRequestTimeout() {
DynamicIntProperty property = DynamicPropertyFactory.getInstance().getIntProperty("cse.service.registry.client.timeout.heartbeat", DEFAULT_REQUEST_HEARTBEAT_TIMEOUT_IN_MS);
int timeout = property.get();
return timeout < 1 ? DEFAULT_REQUEST_HEARTBEAT_TIMEOUT_IN_MS : timeout;
}
use of com.netflix.config.DynamicIntProperty in project incubator-servicecomb-java-chassis by apache.
the class ServiceRegistryConfig method getInstancePullInterval.
public int getInstancePullInterval() {
DynamicIntProperty property = DynamicPropertyFactory.getInstance().getIntProperty("cse.service.registry.instance.pull.interval", DEFAULT_CHECK_INTERVAL_IN_S);
int interval = property.get();
return interval < 0 ? DEFAULT_CHECK_INTERVAL_IN_S : interval;
}
use of com.netflix.config.DynamicIntProperty in project incubator-servicecomb-java-chassis by apache.
the class ServiceRegistryConfig method getConnectionTimeout.
public int getConnectionTimeout() {
DynamicIntProperty property = DynamicPropertyFactory.getInstance().getIntProperty("cse.service.registry.client.timeout.connection", DEFAULT_TIMEOUT_IN_MS);
int timeout = property.get();
return timeout < 0 ? DEFAULT_TIMEOUT_IN_MS : timeout;
}
use of com.netflix.config.DynamicIntProperty in project incubator-servicecomb-java-chassis by apache.
the class ServiceRegistryConfig method getIdleWatchTimeout.
public int getIdleWatchTimeout() {
// watch idle timeout based on SC PING/PONG interval. SC default value is 30.
DynamicIntProperty property = DynamicPropertyFactory.getInstance().getIntProperty("cse.service.registry.client.timeout.watch", DEFAULT_TIMEOUT_IN_SECONDS * 2);
int timeout = property.get();
return timeout < 1 ? DEFAULT_TIMEOUT_IN_SECONDS * 2 : timeout;
}
Aggregations