本文整理了Java中com.netflix.hystrix.HystrixCollapserProperties.Setter()
方法的一些代码示例,展示了HystrixCollapserProperties.Setter()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HystrixCollapserProperties.Setter()
方法的具体详情如下:
包路径:com.netflix.hystrix.HystrixCollapserProperties
类名称:HystrixCollapserProperties
方法名:Setter
[英]Factory method to retrieve the default Setter.
[中]方法检索默认设置器。
代码示例来源:origin: PipelineAI/pipeline
/**
* Factory method to retrieve the default Setter.
* Groovy has a bug (GROOVY-6286) which does not allow method names and inner classes to have the same name
* This method fixes Issue #967 and allows Groovy consumers to choose this method and not trigger the bug
*/
public static Setter defaultSetter() {
return Setter();
}
代码示例来源:origin: PipelineAI/pipeline
/**
* Creates and sets Hystrix collapser properties.
*
* @param properties the collapser properties
*/
public static HystrixCollapserProperties.Setter initializeCollapserProperties(List
return initializeProperties(HystrixCollapserProperties.Setter(), properties, COLLAPSER_PROP_MAP, "collapser");
}
代码示例来源:origin: PipelineAI/pipeline
} else {
if (builder == null) {
builder = HystrixCollapserProperties.Setter();
代码示例来源:origin: PipelineAI/pipeline
public TestCollapserWithVoidResponseTypeAndMissingMapResponseToRequests(CollapserTimer timer, int value) {
super(collapserKeyFromString(timer), Scope.REQUEST, timer, HystrixCollapserProperties.Setter().withMaxRequestsInBatch(1000).withTimerDelayInMilliseconds(50));
this.value = value;
}
代码示例来源:origin: PipelineAI/pipeline
public TestCollapserWithVoidResponseType(CollapserTimer timer, int value) {
super(collapserKeyFromString(timer), Scope.REQUEST, timer, HystrixCollapserProperties.Setter().withMaxRequestsInBatch(1000).withTimerDelayInMilliseconds(50));
this.value = value;
}
代码示例来源:origin: PipelineAI/pipeline
private Collapser(HystrixCollapserKey key, Integer arg) {
super(Setter.withCollapserKey(key)
.andCollapserPropertiesDefaults(
HystrixCollapserProperties.Setter()
.withTimerDelayInMilliseconds(100)));
this.arg = arg;
}
代码示例来源:origin: PipelineAI/pipeline
public TestRequestCollapser(Scope scope, TestCollapserTimer timer, String value, int defaultMaxRequestsInBatch, int defaultTimerDelayInMilliseconds, ConcurrentLinkedQueue
// use a CollapserKey based on the CollapserTimer object reference so it's unique for each timer as we don't want caching
// of properties to occur and we're using the default HystrixProperty which typically does caching
super(collapserKeyFromString(timer), scope, timer, HystrixCollapserProperties.Setter().withMaxRequestsInBatch(defaultMaxRequestsInBatch).withTimerDelayInMilliseconds(defaultTimerDelayInMilliseconds), createMetrics());
this.value = value;
this.commandsExecuted = executionLog;
}
代码示例来源:origin: PipelineAI/pipeline
public TestRequestCollapser(Scope scope, TestCollapserTimer timer, String value, int defaultMaxRequestsInBatch, int defaultTimerDelayInMilliseconds, ConcurrentLinkedQueue
// use a CollapserKey based on the CollapserTimer object reference so it's unique for each timer as we don't want caching
// of properties to occur and we're using the default HystrixProperty which typically does caching
super(collapserKeyFromString(timer), scope, timer, HystrixCollapserProperties.Setter().withMaxRequestsInBatch(defaultMaxRequestsInBatch).withTimerDelayInMilliseconds(defaultTimerDelayInMilliseconds), createMetrics());
this.value = value;
this.commandsExecuted = executionLog;
}
代码示例来源:origin: PipelineAI/pipeline
private static HystrixCollapserMetrics createMetrics() {
HystrixCollapserKey key = HystrixCollapserKey.Factory.asKey("COLLAPSER_ONE");
return HystrixCollapserMetrics.getInstance(key, new HystrixPropertiesCollapserDefault(key, HystrixCollapserProperties.Setter()));
}
代码示例来源:origin: PipelineAI/pipeline
private static HystrixCollapserMetrics createMetrics() {
HystrixCollapserKey key = HystrixCollapserKey.Factory.asKey("COLLAPSER_ONE");
return HystrixCollapserMetrics.getInstance(key, new HystrixPropertiesCollapserDefault(key, HystrixCollapserProperties.Setter()));
}
代码示例来源:origin: PipelineAI/pipeline
MyCollapser(String arg, boolean reqCacheEnabled) {
super(HystrixCollapserKey.Factory.asKey("UNITTEST"),
Scope.REQUEST,
new RealCollapserTimer(),
HystrixCollapserProperties.Setter().withRequestCacheEnabled(reqCacheEnabled),
HystrixCollapserMetrics.getInstance(HystrixCollapserKey.Factory.asKey("UNITTEST"),
new HystrixPropertiesCollapserDefault(HystrixCollapserKey.Factory.asKey("UNITTEST"),
HystrixCollapserProperties.Setter())));
this.arg = arg;
}
代码示例来源:origin: PipelineAI/pipeline
public MyCollapser(String arg, boolean requestCachingOn) {
super(HystrixCollapserKey.Factory.asKey("UNITTEST"),
HystrixObservableCollapser.Scope.REQUEST,
new RealCollapserTimer(),
HystrixCollapserProperties.Setter().withRequestCacheEnabled(requestCachingOn),
HystrixCollapserMetrics.getInstance(HystrixCollapserKey.Factory.asKey("UNITTEST"),
new HystrixPropertiesCollapserDefault(HystrixCollapserKey.Factory.asKey("UNITTEST"),
HystrixCollapserProperties.Setter())));
this.arg = arg;
}
代码示例来源:origin: com.netflix.hystrix/hystrix-core
/**
* Factory method to retrieve the default Setter.
* Groovy has a bug (GROOVY-6286) which does not allow method names and inner classes to have the same name
* This method fixes Issue #967 and allows Groovy consumers to choose this method and not trigger the bug
*/
public static Setter defaultSetter() {
return Setter();
}
代码示例来源:origin: com.netflix.hystrix/hystrix-javanica
/**
* Creates and sets Hystrix collapser properties.
*
* @param properties the collapser properties
*/
public static HystrixCollapserProperties.Setter initializeCollapserProperties(List
return initializeProperties(HystrixCollapserProperties.Setter(), properties, COLLAPSER_PROP_MAP, "collapser");
}
代码示例来源:origin: bijukunjummen/sample-spring-hystrix
public PersonRequestCollapser(Integer id) {
super(Setter.
withCollapserKey(HystrixCollapserKey.Factory.asKey("personRequestCollapser"))
.andCollapserPropertiesDefaults(HystrixCollapserProperties.Setter().withTimerDelayInMilliseconds(2000)));
this.id = id;
}
代码示例来源:origin: ai.grakn/client-java
QueriesObservableCollapser(QueryRequest query, Keyspace keyspace) {
super(Setter
.withCollapserKey(hystrixCollapserKey(keyspace))
.andCollapserPropertiesDefaults(
HystrixCollapserProperties.Setter()
.withRequestCacheEnabled(false)
.withTimerDelayInMilliseconds(maxDelay)
)
);
this.query = query;
this.keyspace = keyspace;
}
代码示例来源:origin: ai.grakn/grakn-client
QueriesObservableCollapser(QueryRequest query, Keyspace keyspace) {
super(Setter
.withCollapserKey(hystrixCollapserKey(keyspace))
.andCollapserPropertiesDefaults(
HystrixCollapserProperties.Setter()
.withRequestCacheEnabled(false)
.withTimerDelayInMilliseconds(maxDelay)
)
);
this.query = query;
this.keyspace = keyspace;
}
代码示例来源:origin: com.netflix.hystrix/hystrix-core
} else {
if (builder == null) {
builder = HystrixCollapserProperties.Setter();
代码示例来源:origin: nurkiewicz/rxjava-book-examples
public FetchRatingsCollapser(Book book) {
super(withCollapserKey(HystrixCollapserKey.Factory.asKey("Books"))
.andCollapserPropertiesDefaults(HystrixCollapserProperties.Setter()
.withTimerDelayInMilliseconds(20)
.withMaxRequestsInBatch(50)
)
.andScope(Scope.GLOBAL));
this.book = book;
}