CombinedParallelSampleBandwidthEstimator.Builder


public class CombinedParallelSampleBandwidthEstimator.Builder


A builder to create CombinedParallelSampleBandwidthEstimator instances.

Summary

Public constructors

Creates a new builder instance.

Public methods

CombinedParallelSampleBandwidthEstimator
CombinedParallelSampleBandwidthEstimator.Builder

Sets the BandwidthStatistic to be used by the estimator.

CombinedParallelSampleBandwidthEstimator.Builder
@CanIgnoreReturnValue
setMinBytesTransferred(long minBytesTransferred)

Sets a minimum threshold of bytes that need to be transferred before the estimator can return a bandwidth estimate.

CombinedParallelSampleBandwidthEstimator.Builder

Sets a minimum threshold of samples that need to be taken before the estimator can return a bandwidth estimate.

Public constructors

Builder

public Builder()

Creates a new builder instance.

Public methods

setBandwidthStatistic

@CanIgnoreReturnValue
public CombinedParallelSampleBandwidthEstimator.Builder setBandwidthStatistic(BandwidthStatistic bandwidthStatistic)

Sets the BandwidthStatistic to be used by the estimator. By default, this is set to a SlidingWeightedAverageBandwidthStatistic.

Parameters
BandwidthStatistic bandwidthStatistic

The BandwidthStatistic.

Returns
CombinedParallelSampleBandwidthEstimator.Builder

This builder for convenience.

setMinBytesTransferred

@CanIgnoreReturnValue
public CombinedParallelSampleBandwidthEstimator.Builder setMinBytesTransferred(long minBytesTransferred)

Sets a minimum threshold of bytes that need to be transferred before the estimator can return a bandwidth estimate. By default, this is set to 0.

Parameters
long minBytesTransferred

The minimum number of transferred bytes.

Returns
CombinedParallelSampleBandwidthEstimator.Builder

This builder for convenience.

setMinSamples

@CanIgnoreReturnValue
public CombinedParallelSampleBandwidthEstimator.Builder setMinSamples(int minSamples)

Sets a minimum threshold of samples that need to be taken before the estimator can return a bandwidth estimate. By default, this is set to 0.

Parameters
int minSamples

The minimum number of samples.

Returns
CombinedParallelSampleBandwidthEstimator.Builder

This builder for convenience.