com.fasterxml.clustermate.client.operation.PutOperationResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clustermate-client Show documentation
Show all versions of clustermate-client Show documentation
Building blocks for client libraries that access
ClusterMate-based service.
package com.fasterxml.clustermate.client.operation;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.clustermate.client.ClusterServerNode;
public class PutOperationResult extends OperationResultImpl
{
/**
* List of servers for which calls succeeded (possibly after initial failures and re-send),
* in order of call completion.
*/
protected final List _succeeded;
public PutOperationResult(OperationConfig config)
{
super(config);
_succeeded = new ArrayList(config.getOptimalOks());
}
public PutOperationResult addSucceeded(ClusterServerNode server) {
_succeeded.add(server);
return this;
}
@Override
public int getSuccessCount() { return _succeeded.size(); }
public Iterable getSuccessServers() { return _succeeded; }
}