Package com.netflix.exhibitor.core.state

Examples of com.netflix.exhibitor.core.state.InstanceStateTypes


    private ServerStatus getStatus(ServerSpec spec)
    {
        if ( spec.equals(us) )
        {
            InstanceStateTypes state = exhibitor.getMonitorRunningInstance().getCurrentInstanceState();
            return new ServerStatus(spec.getHostname(), state.getCode(), state.getDescription(), exhibitor.getMonitorRunningInstance().isCurrentlyLeader());
        }

        try
        {
            RemoteInstanceRequest           request = new RemoteInstanceRequest(exhibitor, spec.getHostname());
View Full Code Here


    {
        List<ServerStatus> live = Lists.newArrayList();
        List<ServerStatus> currentStatuses = statuses.get();
        for ( ServerStatus status : currentStatuses )
        {
            InstanceStateTypes type = InstanceStateTypes.fromCode(status.getCode());
            if ( type != InstanceStateTypes.DOWN )
            {
                live.add(status);
            }
        }
View Full Code Here

    boolean hasDeadInstances()
    {
        List<ServerStatus> currentStatuses = statuses.get();
        for ( ServerStatus status : currentStatuses )
        {
            InstanceStateTypes type = InstanceStateTypes.fromCode(status.getCode());
            if ( type == InstanceStateTypes.DOWN )
            {
                return true;
            }
        }
View Full Code Here

            switchesNode.put(UIResource.fixName(type), context.getExhibitor().getControlPanelValues().isSet(type));
        }
        mainNode.put("switches", switchesNode);

        MonitorRunningInstance  monitorRunningInstance = context.getExhibitor().getMonitorRunningInstance();
        InstanceStateTypes      state = monitorRunningInstance.getCurrentInstanceState();
        mainNode.put("state", state.getCode());
        mainNode.put("description", state.getDescription());
        mainNode.put("isLeader", monitorRunningInstance.isCurrentlyLeader());

        return JsonUtil.writeValueAsString(mainNode);
    }
View Full Code Here

TOP

Related Classes of com.netflix.exhibitor.core.state.InstanceStateTypes

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.