org.infinispan.lock.configuration.ClusteredLockConfigurationBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-clustered-lock Show documentation
Show all versions of infinispan-clustered-lock Show documentation
Infinispan Clustered Lock module
package org.infinispan.lock.configuration;
import org.infinispan.commons.configuration.Builder;
import org.infinispan.commons.configuration.Combine;
import org.infinispan.commons.configuration.attributes.Attribute;
import org.infinispan.commons.configuration.attributes.AttributeSet;
/**
* {@link org.infinispan.lock.api.ClusteredLock} configuration builder.
*
* @author Katia Aresti, [email protected]
* @since 9.4
*/
public class ClusteredLockConfigurationBuilder implements Builder {
private final AttributeSet attributes = ClusteredLockConfiguration.attributeDefinitionSet();
@Override
public AttributeSet attributes() {
return attributes;
}
@Override
public void validate() {
attributes.attributes().forEach(Attribute::validate);
}
@Override
public ClusteredLockConfiguration create() {
return new ClusteredLockConfiguration(attributes.protect());
}
@Override
public Builder> read(ClusteredLockConfiguration template, Combine combine) {
this.attributes.read(template.attributes(), combine);
return this;
}
public ClusteredLockConfigurationBuilder name(String name) {
attributes.attribute(ClusteredLockConfiguration.NAME).set(name);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy