com.brightcove.player.config

## Class AllocatorConfig.Builder

- java.lang.Object
- - com.brightcove.player.config.AllocatorConfig.Builder

- Enclosing class:
    AllocatorConfig

      public static class AllocatorConfig.Builder
      extends java.lang.Object

  The AllocatorConfig Builder.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder()` Instantiates a new AllocatorConfig.Builder.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AllocatorConfig` | `build()` Builds the AllocatorConfig.
    `AllocatorConfig.Builder` | `setIndividualAllocationSize(int individualAllocationSize)` Sets the length of each individual `Allocation`.
    `AllocatorConfig.Builder` | `setInitialAllocationCount(int initialAllocationCount)` Sets the number of allocations to create up front.
    `AllocatorConfig.Builder` | `setTrimOnReset(boolean trimOnReset)` Sets whether memory is freed when the allocator is reset.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Builder

          public Builder()

      Instantiates a new AllocatorConfig.Builder.

  - ### Method Detail

    - #### setTrimOnReset

          public AllocatorConfig.Builder setTrimOnReset(boolean trimOnReset)

      Sets whether memory is freed when the allocator is reset. Should be true unless the allocator will be re-used by multiple player instances.
      Parameters:
        `trimOnReset` - the trim on reset
      Returns:
        the builder instance
      See Also:
        `DefaultAllocator`

    - #### setIndividualAllocationSize

          public AllocatorConfig.Builder setIndividualAllocationSize(int individualAllocationSize)

      Sets the length of each individual `Allocation`.
      Parameters:
        `individualAllocationSize` - the individual allocation size
      Returns:
        the builder instance
      See Also:
        `DefaultAllocator`

    - #### setInitialAllocationCount

          public AllocatorConfig.Builder setInitialAllocationCount(int initialAllocationCount)

      Sets the number of allocations to create up front.
      Parameters:
        `initialAllocationCount` - the initial allocation count
      Returns:
        the builder instance
      See Also:
        `DefaultAllocator`

    - #### build

          public AllocatorConfig build()

      Builds the AllocatorConfig.