All Superinterfaces:
Function<String,Integer>

public interface MaxSegmentProvider extends Function<String,Integer>
Functional interface returning the maximum amount of segments a Coordinator may claim, based on the given processorName.
Since:
4.10.0
Author:
Manish
  • Method Details

    • getMaxSegments

      int getMaxSegments(String processorName)
      Returns the maximum amount of segments to claim for the given processorName.
      Parameters:
      processorName - The name of the processor for which to provide the maximum amount of segments it can claim.
      Returns:
      The maximum number of segments that can be claimed for the given processorName.
    • apply

      default Integer apply(String processorName)
      Returns the maximum amount of segments to claim for the given processorName.
      Specified by:
      apply in interface Function<String,Integer>
      Parameters:
      processorName - The name of a processor for which to provide the maximum amount of segments it can claim.
      Returns:
      The maximum number of segments that can be claimed for the given processorName.
    • maxShort

      static MaxSegmentProvider maxShort()
      A MaxSegmentProvider that always returns Short.MAX_VALUE.
      Returns:
      A MaxSegmentProvider that always returns Short.MAX_VALUE.