org.infinispan.client.hotrod.configuration.NearCacheConfigurationBuilder Maven / Gradle / Ivy
package org.infinispan.client.hotrod.configuration;
import org.infinispan.commons.configuration.Builder;
public class NearCacheConfigurationBuilder extends AbstractConfigurationChildBuilder
implements Builder {
private NearCacheMode mode = NearCacheMode.DISABLED;
private int maxEntries = -1;
protected NearCacheConfigurationBuilder(ConfigurationBuilder builder) {
super(builder);
}
public NearCacheConfigurationBuilder maxEntries(int maxEntries) {
this.maxEntries = maxEntries;
return this;
}
public NearCacheConfigurationBuilder mode(NearCacheMode mode) {
this.mode = mode;
return this;
}
@Override
public void validate() {
// No-op
}
@Override
public NearCacheConfiguration create() {
return new NearCacheConfiguration(mode, maxEntries);
}
@Override
public Builder> read(NearCacheConfiguration template) {
mode = template.mode();
maxEntries = template.maxEntries();
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy