Package org.elasticsearch.common.breaker

Examples of org.elasticsearch.common.breaker.ChildMemoryCircuitBreaker


        CircuitBreaker fielddataBreaker;
        if (fielddataSettings.getType() == CircuitBreaker.Type.NOOP) {
            fielddataBreaker = new NoopCircuitBreaker(CircuitBreaker.Name.FIELDDATA);
        } else {
            fielddataBreaker = new ChildMemoryCircuitBreaker(fielddataSettings, logger, this, CircuitBreaker.Name.FIELDDATA);
        }

        CircuitBreaker requestBreaker;
        if (requestSettings.getType() == CircuitBreaker.Type.NOOP) {
            requestBreaker = new NoopCircuitBreaker(CircuitBreaker.Name.REQUEST);
        } else {
            requestBreaker = new ChildMemoryCircuitBreaker(requestSettings, logger, this, CircuitBreaker.Name.REQUEST);
        }

        tempBreakers.put(CircuitBreaker.Name.FIELDDATA, fielddataBreaker);
        tempBreakers.put(CircuitBreaker.Name.REQUEST, requestBreaker);
        this.breakers = ImmutableMap.copyOf(tempBreakers);
View Full Code Here


                Map<CircuitBreaker.Name, CircuitBreaker> tempBreakers = new HashMap<>();
                CircuitBreaker fielddataBreaker;
                if (newFielddataSettings.getType() == CircuitBreaker.Type.NOOP) {
                    fielddataBreaker = new NoopCircuitBreaker(CircuitBreaker.Name.FIELDDATA);
                } else {
                    fielddataBreaker = new ChildMemoryCircuitBreaker(newFielddataSettings,
                            (ChildMemoryCircuitBreaker) HierarchyCircuitBreakerService.this.breakers.get(CircuitBreaker.Name.FIELDDATA),
                            logger, HierarchyCircuitBreakerService.this, CircuitBreaker.Name.FIELDDATA);
                }

                CircuitBreaker requestBreaker;
                if (newRequestSettings.getType() == CircuitBreaker.Type.NOOP) {
                    requestBreaker = new NoopCircuitBreaker(CircuitBreaker.Name.REQUEST);
                } else {
                    requestBreaker = new ChildMemoryCircuitBreaker(newRequestSettings,
                            (ChildMemoryCircuitBreaker)HierarchyCircuitBreakerService.this.breakers.get(CircuitBreaker.Name.REQUEST),
                            logger, HierarchyCircuitBreakerService.this, CircuitBreaker.Name.REQUEST);
                }

                tempBreakers.put(CircuitBreaker.Name.FIELDDATA, fielddataBreaker);
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.breaker.ChildMemoryCircuitBreaker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.