Search in sources :

Example 31 with DynamicIntProperty

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;
}
Also used : DynamicIntProperty(com.netflix.config.DynamicIntProperty)

Example 32 with DynamicIntProperty

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;
}
Also used : DynamicIntProperty(com.netflix.config.DynamicIntProperty)

Example 33 with DynamicIntProperty

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;
}
Also used : DynamicIntProperty(com.netflix.config.DynamicIntProperty)

Example 34 with DynamicIntProperty

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;
}
Also used : DynamicIntProperty(com.netflix.config.DynamicIntProperty)

Aggregations

DynamicIntProperty (com.netflix.config.DynamicIntProperty)34 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 DynamicFloatProperty (com.netflix.config.DynamicFloatProperty)1 HystrixCommandProperties (com.netflix.hystrix.HystrixCommandProperties)1 ChannelConfig (com.netflix.netty.common.channel.config.ChannelConfig)1 ServerSslConfig (com.netflix.netty.common.ssl.ServerSslConfig)1 Http2SslChannelInitializer (com.netflix.zuul.netty.server.http2.Http2SslChannelInitializer)1 BaseSslContextFactory (com.netflix.zuul.netty.ssl.BaseSslContextFactory)1 SampleSSEPushChannelInitializer (com.netflix.zuul.sample.push.SampleSSEPushChannelInitializer)1 SampleWebSocketPushChannelInitializer (com.netflix.zuul.sample.push.SampleWebSocketPushChannelInitializer)1 ChannelInitializer (io.netty.channel.ChannelInitializer)1 InetSocketAddress (java.net.InetSocketAddress)1 SocketAddress (java.net.SocketAddress)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Header (org.apache.http.Header)1 ThreadSafeClientConnManager (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager)1 BasicHeader (org.apache.http.message.BasicHeader)1 HttpParams (org.apache.http.params.HttpParams)1