Package com.netflix.exhibitor.core.automanage

Examples of com.netflix.exhibitor.core.automanage.RemoteInstanceRequest


        RollingConfigAdvanceAttempt         activeAttempt = rollingConfigAdvanceAttempt.get();

        RemoteInstanceRequest.Result        result;
        if ( (activeAttempt == null) || !activeAttempt.getHostname().equals(state.getCurrentRollingHostname()) || (activeAttempt.getAttemptCount() < maxAttempts) )
        {
            RemoteInstanceRequest           remoteInstanceRequest = new RemoteInstanceRequest(exhibitor, state.getCurrentRollingHostname());
            result = callRemoteInstanceRequest(remoteInstanceRequest);

            if ( activeAttempt == null )
            {
                activeAttempt = new RollingConfigAdvanceAttempt(state.getCurrentRollingHostname());
                rollingConfigAdvanceAttempt.set(activeAttempt);
            }
            activeAttempt.incrementAttemptCount();

            if ( result.errorMessage.length() != 0 )
            {
                if ( activeAttempt.getAttemptCount() >= maxAttempts )
                {
                    exhibitor.getLog().add(ActivityLog.Type.INFO, "Exhausted attempts to connect to " + remoteInstanceRequest.getHostname() + " - skipping and moving on to next instance");
                    newCollection = checkNextInstanceState(config, rollingHostNames, rollingHostNamesIndex + 1)// it must be down. Skip it.
                }
                else
                {
                    exhibitor.getLog().add(ActivityLog.Type.INFO, "Could not connect to " + remoteInstanceRequest.getHostname() + " - attempt #" + activeAttempt.getAttemptCount());
                    newCollection = null;
                }
            }
        }
        else
View Full Code Here


        }
        else
        {
            try
            {
                RemoteInstanceRequest           request = new RemoteInstanceRequest(context.getExhibitor(), hostname);
                RemoteInstanceRequest.Result    result = request.makeRequest(context.getExhibitor().getRemoteInstanceRequestClient(), methodName, values);

                remoteResponse = result.remoteResponse;
                errorMessage = result.errorMessage;
            }
            catch ( Exception e )
View Full Code Here

TOP

Related Classes of com.netflix.exhibitor.core.automanage.RemoteInstanceRequest

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.