All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.client.hotrod.impl.CacheTopologyInfoImpl Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.client.hotrod.impl;

import java.net.SocketAddress;
import java.util.Map;
import java.util.Set;

import org.infinispan.client.hotrod.CacheTopologyInfo;

/**
 * @author gustavonalle
 * @since 8.0
 */
public class CacheTopologyInfoImpl implements CacheTopologyInfo {
   private final Map> segmentsByServer;
   private final Integer numSegments;
   private final Integer topologyId;

   public CacheTopologyInfoImpl(Map> segmentsByServer, Integer numSegments, Integer topologyId) {
      this.segmentsByServer = segmentsByServer;
      this.numSegments = numSegments;
      this.topologyId = topologyId;
   }

   @Override
   public Integer getNumSegments() {
      return numSegments;
   }

   @Override
   public Integer getTopologyId() {
      return topologyId;
   }

   @Override
   public Map> getSegmentsPerServer() {
      return segmentsByServer;
   }

   @Override
   public String toString() {
      return "CacheTopologyInfoImpl{" +
              "segmentsByServer=" + segmentsByServer +
              ", numSegments=" + numSegments +
              ", topologyId=" + topologyId +
              '}';
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy