Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.clustermate.client;
 
 import java.util.*;

Class that contains information about failure of an operation as it relates to call(s) to a single server node. Each instance contains at least one actual CallFailure.
 
public class NodeFailure
    protected final ClusterServerNode _server;
    protected LinkedList<CallFailure_failures;
    
    public NodeFailure(ClusterServerNode serverCallFailure firstFail)
    {
         = server;
         = new LinkedList<CallFailure>();
        .add(firstFail);
    }
    public void addFailure(CallFailure fail) {
        .add(fail);
    }
    
    public ClusterServerNode getServer() { return ; }

    
Returns number of attempts that were made before giving up
    public int getFailCount() { return .size(); }
    public CallFailure getFirstCallFailure() { return .getFirst(); }
    public CallFailure getLastCallFailure() { return .getLast(); }
    public Iterable<CallFailuregetCallFailures() { return ; }
    @Override
    public String toString() {
        return "[Node Failure: "+.size()+" failed; first = "+getFirstCallFailure()+"]";
    }
New to GrepCode? Check out our FAQ X