Class AllocatorConfig.Builder

java.lang.Object
com.brightcove.player.config.AllocatorConfig.Builder
Enclosing class:
AllocatorConfig

public static class AllocatorConfig.Builder extends Object
The AllocatorConfig Builder.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new AllocatorConfig.Builder.
  • Method Details

    • 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.