Class CheckedCacheConfigBuilder<K,​V,​E extends Exception>


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

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

    • Constructor Detail

      • CheckedCacheConfigBuilder

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

      • anchor

        @CanIgnoreReturnValue
        public final CheckedCacheConfigBuilder<K,​V,​E> 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 CheckedCacheConfigBuilder<K,​V,​E> 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 CheckedCacheConfigBuilder<K,​V,​E> 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 CheckedCacheConfigBuilder<K,​V,​E> cacheFunction​(CheckedCacheFunction<K,​V,​E> cacheFunction)
        Initializes the value for the cacheFunction attribute.
        Parameters:
        cacheFunction - The value for cacheFunction
        Returns:
        this builder for use in a chained invocation