Package com.netflix.eureka.util

Examples of com.netflix.eureka.util.EIPManager


    private void handleEIPBinding(PeerAwareInstanceRegistry registry)
    throws InterruptedException {
        EurekaServerConfig eurekaServerConfig = EurekaServerConfigurationManager.getInstance().getConfiguration();
        int retries = eurekaServerConfig.getEIPBindRebindRetries();
         // Bind to EIP if needed
        EIPManager eipManager = EIPManager.getInstance();
        for (int i = 0; i < retries; i++) {
               try {
                    if (eipManager.isEIPBound()) {
                        break;
                    } else {
                        eipManager.bindEIP();
                    }
                } catch (Throwable e) {
                    logger.error("Cannot bind to EIP", e);
                    Thread.sleep(EIP_BIND_SLEEP_TIME_MS);
                }
View Full Code Here


            public void run() {
                try {
                    // If the EIP is not bound, the registry could  be stale
                    // First sync up the registry from the neighboring node before
                    // trying to bind the EIP
                    EIPManager eipManager = EIPManager.getInstance();
                    if (!eipManager.isEIPBound()) {
                        registry.clearRegistry();
                        int count = registry.syncUp();
                        registry.openForTraffic(count);
                    } else {
                        // An EIP is already bound
                        return;
                    }
                    eipManager.bindEIP();
                } catch (Throwable e) {
                    logger.error("Could not bind to EIP", e);
                }
            }
        }, eurekaServerConfig.getEIPBindingRetryIntervalMs(),
View Full Code Here

TOP

Related Classes of com.netflix.eureka.util.EIPManager

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.