Class CacheConfigBuilder<K,​V>


  • @Generated("org.immutables.processor.ProxyProcessor")
    public final class CacheConfigBuilder<K,​V>
    extends Object
    Builds instances of type CacheConfig. Initialize attributes and then invoke the build() method to create an immutable instance.

    CacheConfigBuilder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Constructor Detail

      • CacheConfigBuilder

        public CacheConfigBuilder()
        Creates a builder for CacheConfig instances.
         new CacheConfigBuilder&lt;K, V&gt;()
            .anchor(Object) // required anchor
            .id(String) // optional id
            .description(String) // optional description
            .cacheFunction(org.opendaylight.infrautils.caches.CacheFunction&lt;K, V&gt;) // required cacheFunction
            .build();
         
    • Method Detail

      • anchor

        @CanIgnoreReturnValue
        public final CacheConfigBuilder<K,​V> anchor​(Object anchor)
        Initializes the value for the anchor attribute.
        Parameters:
        anchor - The value for anchor
        Returns:
        this builder for use in a chained invocation
      • id

        @CanIgnoreReturnValue
        public final CacheConfigBuilder<K,​V> id​(String id)
        Initializes the value for the id attribute.

        If not set, this attribute will have a default value as returned by the initializer of id.

        Parameters:
        id - The value for id
        Returns:
        this builder for use in a chained invocation
      • description

        @CanIgnoreReturnValue
        public final CacheConfigBuilder<K,​V> description​(String description)
        Initializes the value for the description attribute.

        If not set, this attribute will have a default value as returned by the initializer of description.

        Parameters:
        description - The value for description
        Returns:
        this builder for use in a chained invocation
      • cacheFunction

        @CanIgnoreReturnValue
        public final CacheConfigBuilder<K,​V> cacheFunction​(CacheFunction<K,​V> cacheFunction)
        Initializes the value for the cacheFunction attribute.
        Parameters:
        cacheFunction - The value for cacheFunction
        Returns:
        this builder for use in a chained invocation