use of org.jboss.as.clustering.infinispan.subsystem.StoreResourceDefinition.Attribute.SINGLETON in project wildfly by wildfly.
the class StoreBuilder method configure.
@Override
public Builder<PersistenceConfiguration> configure(OperationContext context, ModelNode model) throws OperationFailedException {
this.storeBuilder = this.storeBuilderFactory.apply(context, model);
this.storeBuilder.persistence().passivation(PASSIVATION.resolveModelAttribute(context, model).asBoolean());
Properties properties = new Properties();
ModelNodes.optionalPropertyList(PROPERTIES.resolveModelAttribute(context, model)).ifPresent(list -> list.forEach(property -> properties.setProperty(property.getName(), property.getValue().asString())));
this.storeBuilder.fetchPersistentState(FETCH_STATE.resolveModelAttribute(context, model).asBoolean()).preload(PRELOAD.resolveModelAttribute(context, model).asBoolean()).purgeOnStartup(PURGE.resolveModelAttribute(context, model).asBoolean()).shared(SHARED.resolveModelAttribute(context, model).asBoolean()).singleton().enabled(SINGLETON.resolveModelAttribute(context, model).asBoolean()).withProperties(properties);
return this;
}
Aggregations