
org.infinispan.server.hotrod.Response Maven / Gradle / Ivy
package org.infinispan.server.hotrod;
import java.util.Map;
import org.infinispan.remoting.transport.Address;
abstract class AbstractTopologyResponse {
final int topologyId;
final Map serverEndpointsMap;
final int numSegments;
protected AbstractTopologyResponse(int topologyId, Map serverEndpointsMap, int numSegments) {
this.topologyId = topologyId;
this.serverEndpointsMap = serverEndpointsMap;
this.numSegments = numSegments;
}
}
class TopologyAwareResponse extends AbstractTopologyResponse {
protected TopologyAwareResponse(int topologyId, Map serverEndpointsMap, int numSegments) {
super(topologyId, serverEndpointsMap, numSegments);
}
@Override
public String toString() {
return "TopologyAwareResponse{" +
"topologyId=" + topologyId +
", numSegments=" + numSegments +
'}';
}
}
class HashDistAware20Response extends AbstractTopologyResponse {
final byte hashFunction;
protected HashDistAware20Response(int topologyId, Map serverEndpointsMap, int numSegments,
byte hashFunction) {
super(topologyId, serverEndpointsMap, numSegments);
this.hashFunction = hashFunction;
}
@Override
public String toString() {
return "HashDistAware20Response{" +
"topologyId=" + topologyId +
", numSegments=" + numSegments +
", hashFunction=" + hashFunction +
'}';
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy