Package com.fasterxml.clustermate.api

Examples of com.fasterxml.clustermate.api.ClusterStatusResponse


            while (it.hasNext()) {
                IpAndPort ip = it.next();
                final long requestTime = System.currentTimeMillis();
                long maxTimeout = waitUntil - requestTime;
                try {
                    ClusterStatusResponse resp = _accessor.getClusterStatus(ip,
                            Math.min(maxTimeout, BOOTSTRAP_TIMEOUT_MSECS));
                    if (resp == null) {
                        continue;
                    }
                    it.remove(); // remove from bootstrap list
View Full Code Here


        while (it.hasNext()) {
            IpAndPort ip = it.next();
            final long requestTime = System.currentTimeMillis();
            long maxTimeout = waitUntil - requestTime;
            try {
                ClusterStatusResponse resp = _accessor.getClusterStatus(ip,
                        Math.min(maxTimeout, BOOTSTRAP_TIMEOUT_MSECS));
                if (resp == null) {
                    continue;
                }
                it.remove(); // remove from bootstrap list
View Full Code Here

        try {
            in = conn.getInputStream();
        } catch (IOException e) {
            throw new IOException("Can not access Cluster state using '"+endpoint+"': "+e.getMessage());
        }
        ClusterStatusResponse result;
        try {
            result = _mapper.readValue(in, ClusterStatusResponse.class);
        } catch (IOException e) {
            throw new IOException("Invalid Cluster state returned by '"+endpoint+"', failed to parse JSON: "+e.getMessage());
        } finally {
View Full Code Here

    @SuppressWarnings("unchecked")
    public <RESP extends ServiceResponse> RESP getStatus(ServiceRequest request, RESP response)
    {
        // use streaming impl just so we'll use specific ObjectWriter
        return (RESP) response.ok(new StreamingEntityImpl(_writer,
                new ClusterStatusResponse(_cluster.getLastUpdated(),
                        _cluster.getLocalState(),
                        _cluster.getRemoteStates())))
            .setContentTypeJson();
    }
View Full Code Here

TOP

Related Classes of com.fasterxml.clustermate.api.ClusterStatusResponse

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.