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

org.infinispan.commons.configuration.Combine Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.commons.configuration;

/**
 * 

* Defines how {@link org.infinispan.commons.configuration.attributes.Attribute}s and {@link org.infinispan.commons.configuration.attributes.ConfigurationElement}s * are combined when overlaying a configuration (the overlay) on top of another (the template) using {@link Builder#read(Object, Combine)}. *

*

* The strategies for combining attributes: *

  • *
      MERGE: the overlay attributes overwrite those of the template only if they have been modified
    *
      OVERRIDE: the overlay attributes are used, regardless of their modification status.
    *
  • *

    * The strategies for combining repeatable attributes: *

  • *
      MERGE: repeatable attributes will be a combination of both the template and the overlay.
    *
      OVERRIDE: only the overlay repeatable attributes will be used.
    *
  • *

    * * @since 15.0 **/ public class Combine { public static final Combine DEFAULT = new Combine(RepeatedAttributes.OVERRIDE, Attributes.MERGE); public enum RepeatedAttributes { MERGE, OVERRIDE } public enum Attributes { MERGE, OVERRIDE } private final RepeatedAttributes repeatedAttributes; private final Attributes attributes; public Combine(RepeatedAttributes repeatedAttributes, Attributes attributes) { this.repeatedAttributes = repeatedAttributes; this.attributes = attributes; } public RepeatedAttributes repeatedAttributes() { return repeatedAttributes; } public Attributes attributes() { return attributes; } @Override public String toString() { return "Combine{" + "repeatedAttributes=" + repeatedAttributes + ", attributes=" + attributes + '}'; } }




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy