All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fasterxml.clustermate.client.operation.SingleCallState Maven / Gradle / Ivy

There is a newer version: 0.10.5
Show newest version
package com.fasterxml.clustermate.client.operation;

import com.fasterxml.clustermate.client.ClusterServerNode;
import com.fasterxml.clustermate.client.NodeFailure;
import com.fasterxml.clustermate.client.call.CallFailure;

/**
 * Container used to hold in-flight information about calls to a single applicable
 * target node.
 */
final class SingleCallState
{
    protected final ClusterServerNode _node;

    protected NodeFailure _fails;
    
    public SingleCallState(ClusterServerNode node)
    {
        _node = node;
    }

    public void addFailure(CallFailure fail) {
        if (_fails == null) {
            _fails = new NodeFailure(_node, fail);
        } else {
            _fails.addFailure(fail);
        }
    }
    
    public ClusterServerNode server() { return _node; }

    public NodeFailure getFails() { return _fails; }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy