Package 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.ObjectThe AllocatorConfig Builder.
-
-
Constructor Summary
Constructors Constructor Description Builder()Instantiates a new AllocatorConfig.Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AllocatorConfigbuild()Builds the AllocatorConfig.AllocatorConfig.BuildersetIndividualAllocationSize(int individualAllocationSize)Sets the length of each individualAllocation.AllocatorConfig.BuildersetInitialAllocationCount(int initialAllocationCount)Sets the number of allocations to create up front.AllocatorConfig.BuildersetTrimOnReset(boolean trimOnReset)Sets whether memory is freed when the allocator is reset.
-
-
-
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 individualAllocation.- 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.
-
-