com.fasterxml.clustermate.client.operation.HeadOperationResult 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 com.fasterxml.clustermate.client.ClusterServerNode;
public class HeadOperationResult
extends ReadOperationResult
{
/**
* Actual length fetched, if any
*/
protected long _contentLength = -1L;
public HeadOperationResult(OperationConfig config)
{
super(config);
}
public HeadOperationResult setContentLength(ClusterServerNode server, long length)
{
if (_server != null) {
throw new IllegalStateException("Already received successful response from "+_server+"; trying to override with "+server);
}
_server = server;
_contentLength = length;
return this;
}
// // // Extended API
public long getContentLength() { return _contentLength; }
}