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

org.infinispan.persistence.remote.configuration.RemoteServerConfigurationBuilder Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.persistence.remote.configuration;

import org.infinispan.commons.configuration.Builder;
import org.infinispan.configuration.global.GlobalConfiguration;

public class RemoteServerConfigurationBuilder extends AbstractRemoteStoreConfigurationChildBuilder implements
      Builder {
   private String host;
   private int port = 11222;

   RemoteServerConfigurationBuilder(RemoteStoreConfigurationBuilder builder) {
      super(builder);
   }

   public RemoteServerConfigurationBuilder host(String host) {
      this.host = host;
      return this;
   }

   public RemoteServerConfigurationBuilder port(int port) {
      this.port = port;
      return this;
   }

   @Override
   public void validate() {
   }

   @Override
   public void validate(GlobalConfiguration globalConfig) {
   }

   @Override
   public RemoteServerConfiguration create() {
      return new RemoteServerConfiguration(host, port);
   }

   @Override
   public RemoteServerConfigurationBuilder read(RemoteServerConfiguration template) {
      this.host = template.host();
      this.port = template.port();

      return this;
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy