Package com.fasterxml.clustermate.api

Examples of com.fasterxml.clustermate.api.NodeState


        long since = (sinceL == null) ? 0L : sinceL.longValue();
       
        /* One more thing: let's sanity check that our key range overlaps request
         * range. If not, can avoid (possibly huge) database scan.
         */
        NodeState localState = _cluster.getLocalState();       
        List<E> entries;

        KeyRange localRange = localState.totalRange();
        if (localRange.overlapsWith(range)) {
            entries = _listEntries(range, since, upUntil, _maxToListPerRequest, timestamp);
        /*
System.err.println("Sync for "+_localState.getRangeActive()+" (slice of "+range+"); between "+sinceL+" and "+upUntil+", got "+entries.size()+"/"
+_stores.getEntryStore().getEntryCount()+" entries... (time: "+_timeMaster.currentTimeMillis()+")");
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.clusterLastUpdated);
                    for (NodeState stateSec : resp.remote) {
                        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

    @Override
    protected void _handleGet(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics stats, K key)
        throws IOException
    {
        NodeState node = _findRedirect(request, response, key);
        if (node == null) {
            _storeHandler.getEntry(request, response, key, stats);
            _addStdHeaders(response);
            return;
        }
View Full Code Here

    @Override
    protected void _handleHead(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics stats, K key)
        throws IOException
    {
        NodeState node = _findRedirect(request, response, key);
        if (node == null) {
            _storeHandler.getEntryStats(request, response, key, stats);
            _addStdHeaders(response);
            return;
        }
View Full Code Here

    @Override
    protected void _handlePut(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics stats, K key)
        throws IOException
    {
        NodeState node = _findRedirect(request, response, key);
        if (node == null) {
            _storeHandler.putEntry(request, response, key, request.getInputStream(),
                    stats);
            _addStdHeaders(response);
            return;
View Full Code Here

    @Override
    protected void _handleDelete(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics stats, K key)
        throws IOException
    {
        NodeState node = _findRedirect(request, response, key);
        if (node == null) {
            _storeHandler.removeEntry(request, response, key, stats);
            _addStdHeaders(response);
            return;
        }
View Full Code Here

    @Override
    protected ServletServiceResponse _handleGet(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics stats, K key)
        throws IOException
    {
        NodeState node = _findRedirect(request, response, key);
        if (node == null) {
            response = (ServletServiceResponse) _storeHandler.getEntry(request, response, key, stats);
            _addStdHeaders(response);
            return response;
        }
View Full Code Here

    @Override
    protected ServletServiceResponse _handleHead(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics stats, K key)
        throws IOException
    {
        NodeState node = _findRedirect(request, response, key);
        if (node == null) {
            _storeHandler.getEntryStats(request, response, key, stats);
            _addStdHeaders(response);
            return response;
        }
View Full Code Here

    @Override
    protected ServletServiceResponse _handlePut(ServletServiceRequest request, ServletServiceResponse response,
            OperationDiagnostics stats, K key)
        throws IOException
    {
        NodeState node = _findRedirect(request, response, key);
        if (node == null) {
            _storeHandler.putEntry(request, response, key, request.getInputStream(),
                    stats);
            _addStdHeaders(response);
            return response;
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.