Package com.brightcove.player.config
Class AllocatorConfig.Builder
java.lang.Object
com.brightcove.player.config.AllocatorConfig.Builder
- Enclosing class:
- AllocatorConfig
The AllocatorConfig Builder.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the AllocatorConfig.setIndividualAllocationSize
(int individualAllocationSize) Sets the length of each individualAllocation
.setInitialAllocationCount
(int initialAllocationCount) Sets the number of allocations to create up front.setTrimOnReset
(boolean trimOnReset) Sets whether memory is freed when the allocator is reset.
-
Constructor Details
-
Builder
public Builder()Instantiates a new AllocatorConfig.Builder.
-
-
Method Details
-
setTrimOnReset
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
Sets the length of each individualAllocation
.- Parameters:
individualAllocationSize
- the individual allocation size- Returns:
- the builder instance
- See Also:
-
DefaultAllocator
-
setInitialAllocationCount
Sets the number of allocations to create up front.- Parameters:
initialAllocationCount
- the initial allocation count- Returns:
- the builder instance
- See Also:
-
DefaultAllocator
-
build
Builds the AllocatorConfig.
-