Package com.fasterxml.clustermate.api

Examples of com.fasterxml.clustermate.api.NodeState


                            Math.min(maxTimeout, BOOTSTRAP_TIMEOUT_MSECS));
                    if (resp == null) {
                        continue;
                    }
                    it.remove(); // remove from bootstrap list
                    NodeState local = resp.local;
                    ClusterViewByClientImpl<K> clusterView = new ClusterViewByClientImpl<K>(
                            config, _httpClient, local.totalRange().getKeyspace());
                    clusterView.updateDirectState(ip, local,
                            requestTime, System.currentTimeMillis(), resp.creationTime);
                    for (NodeState stateSec : resp.remote) {
                        clusterView.updateIndirectState(ip, stateSec);
                    }
View Full Code Here


                            Math.min(maxTimeout, BOOTSTRAP_TIMEOUT_MSECS));
                    if (resp == null) {
                        continue;
                    }
                    it.remove(); // remove from bootstrap list
                    NodeState peer = resp.local;
                    bs.updateDirectState(ip, peer,
                            requestTime, System.currentTimeMillis(), resp.creationTime);
                    // Important: include LOCAL peers of REMOTE that we called; must NOT
                    // Cross the Lines
                    for (NodeState stateSec : resp.localPeers) {
View Full Code Here

    }

    protected String _buildSyncListUrl(ClusterViewByServerUpdatable cluster, NodeState remote,
            long lastClusterHash)
    {
        final NodeState local = cluster.getLocalState();
        final long syncedUpTo = remote.getSyncedUpTo();

        /* Need to be sure to pass the full range; remote end can do filtering,
         * (to reduce range if need be), but it needs to know full range
         * for initial auto-registration. Although ideally maybe we should
         * pass active and passive separately... has to do, for now.
         */
        final KeyRange syncRange = local.totalRange();
        final ServiceConfig config = _stuff.getServiceConfig();
        RequestPathBuilder pathBuilder = new JdkHttpClientPathBuilder(remote.getAddress())
            .addPathSegments(config.servicePathRoot);
        pathBuilder = _stuff.getPathStrategy().appendSyncListPath(pathBuilder);
        pathBuilder = pathBuilder.addParameter(ClusterMateConstants.QUERY_PARAM_SINCE,
View Full Code Here

    @Override
    public void updateWith(ClusterStatusMessage msg)
    {
        final long updateTime = _timeMaster.currentTimeMillis();
        int mods = 0;
        NodeState local = msg.local;
        if (local == null) { // should never occur
            LOG.info("msg.local is null, should never happen");
        } else {
            if (updateStatus(local, true)) {
                ++mods;
View Full Code Here

                            Math.min(maxTimeout, BOOTSTRAP_TIMEOUT_MSECS));
                    if (resp == null) {
                        continue;
                    }
                    it.remove(); // remove from bootstrap list
                    NodeState local = resp.local;
                    ClusterViewByClientImpl<K> clusterView = new ClusterViewByClientImpl<K>(
                            config, _httpClient, local.totalRange().getKeyspace());
                    clusterView.updateDirectState(ip, local,
                            requestTime, System.currentTimeMillis(), resp.creationTime);
                    for (NodeState stateSec : resp.remote) {
                        clusterView.updateIndirectState(ip, stateSec);
                    }
View Full Code Here

                            Math.min(maxTimeout, BOOTSTRAP_TIMEOUT_MSECS));
                    if (resp == null) {
                        continue;
                    }
                    it.remove(); // remove from bootstrap list
                    NodeState local = resp.local;
                    ClusterViewByClientImpl<K> clusterView = new ClusterViewByClientImpl<K>(
                            config, _httpClient, local.totalRange().getKeyspace());
                    clusterView.updateDirectState(ip, local,
                            requestTime, System.currentTimeMillis(), resp.creationTime);
                    for (NodeState stateSec : resp.localPeers) {
                        clusterView.updateIndirectState(ip, stateSec);
                    }
View Full Code Here

    @Override
    public void updateWith(ClusterStatusMessage msg)
    {
        final long updateTime = _timeMaster.currentTimeMillis();
        int mods = 0;
        NodeState local = msg.local;
        if (local == null) { // should never occur
            LOG.info("msg.local is null, should never happen");
        } else {
            if (updateStatus(local, true)) {
                ++mods;
View Full Code Here

    }

    protected String _buildSyncListUrl(ClusterViewByServerUpdatable cluster, NodeState remote,
            long lastClusterHash)
    {
        final NodeState local = cluster.getLocalState();
        final long syncedUpTo = remote.getSyncedUpTo();

        /* Need to be sure to pass the full range; remote end can do filtering,
         * (to reduce range if need be), but it needs to know full range
         * for initial auto-registration. Although ideally maybe we should
         * pass active and passive separately... has to do, for now.
         */
        final KeyRange syncRange = local.totalRange();
        final ServiceConfig config = _stuff.getServiceConfig();
        RequestPathBuilder pathBuilder = new JdkHttpClientPathBuilder(remote.getAddress())
            .addPathSegments(config.servicePathRoot);
        pathBuilder = _stuff.getPathStrategy().appendPath(pathBuilder, PathType.SYNC_LIST);
        pathBuilder = pathBuilder.addParameter(ClusterMateConstants.QUERY_PARAM_SINCE,
View Full Code Here

    }
   
    protected String _buildSyncListUrl(ClusterViewByServerUpdatable cluster, NodeState remote,
            long lastClusterHash)
    {
        final NodeState local = cluster.getLocalState();
        final long syncedUpTo = remote.getSyncedUpTo();

        /* Need to be sure to pass the full range; remote end can do filtering,
         * (to reduce range if need be), but it needs to know full range
         * for initial auto-registration. Although ideally maybe we should
         * pass active and passive separately... has to do, for now.
         */
        final KeyRange syncRange = local.totalRange();
        final ServiceConfig config = _stuff.getServiceConfig();
        RequestPathBuilder pathBuilder = new JdkHttpClientPathBuilder(remote.getAddress())
            .addPathSegments(config.servicePathRoot);
        pathBuilder = _stuff.getPathStrategy().appendSyncListPath(pathBuilder);
        pathBuilder = pathBuilder.addParameter(ClusterMateConstants.HTTP_QUERY_PARAM_SINCE,
View Full Code Here

                            Math.min(maxTimeout, BOOTSTRAP_TIMEOUT_MSECS));
                    if (resp == null) {
                        continue;
                    }
                    it.remove(); // remove from bootstrap list
                    NodeState local = resp.local;
                    ClusterViewByClientImpl<K> clusterView = new ClusterViewByClientImpl<K>(
                            config, _httpClient, local.totalRange().getKeyspace());
                    clusterView.updateDirectState(ip, local,
                            requestTime, System.currentTimeMillis(), resp.creationTime);
                    for (NodeState stateSec : resp.remote) {
                        clusterView.updateIndirectState(ip, stateSec);
                    }
View Full Code Here

TOP

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

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.