
com.fasterxml.clustermate.api.ClusterStatusAccessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clustermate-api Show documentation
Show all versions of clustermate-api Show documentation
Data types needed for service abstraction,
used by both server and client components.
The newest version!
package com.fasterxml.clustermate.api;
import java.io.*;
import com.fasterxml.clustermate.api.msg.ClusterStatusMessage;
import com.fasterxml.storemate.shared.IpAndPort;
/**
* Helper class that handles details of getting cluster status information
* from a store node.
*/
public abstract class ClusterStatusAccessor
{
protected final static long MIN_TIMEOUT_MSECS = 10L;
public abstract ClusterStatusMessage getClusterStatus(IpAndPort ip, long timeoutMsecs)
throws IOException;
public abstract ClusterStatusMessage getRemoteStatus(IpAndPort ip, long timeoutMsecs)
throws IOException;
public abstract ClusterStatusMessage getClusterStatus(String endpoint, long timeoutMsecs)
throws IOException;
/**
* Simple interface for thing used to serialize payload of cluster status end point.
*/
public abstract static class Converter {
public abstract ClusterStatusMessage fromJSON(InputStream in) throws IOException;
public abstract ClusterStatusMessage fromJSON(byte[] msg, int offset, int len) throws IOException;
public abstract void asJSON(ClusterStatusMessage msg, OutputStream out) throws IOException;
public abstract byte[] asJSONBytes(ClusterStatusMessage msg, OutputStream out) throws IOException;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy