Class DefaultCostProvider

java.lang.Object
org.apache.hadoop.ipc.DefaultCostProvider
All Implemented Interfaces:
CostProvider

public class DefaultCostProvider extends Object implements CostProvider
Ignores process details and returns a constant value for each call.
  • Constructor Details

    • DefaultCostProvider

      public DefaultCostProvider()
  • Method Details

    • init

      public void init(String namespace, Configuration conf)
      Description copied from interface: CostProvider
      Initialize this provider using the given configuration, examining only ones which fall within the provided namespace.
      Specified by:
      init in interface CostProvider
      Parameters:
      namespace - The namespace to use when looking up configurations.
      conf - The configuration
    • getCost

      public long getCost(ProcessingDetails details)
      Returns 1, regardless of the processing details.
      Specified by:
      getCost in interface CostProvider
      Parameters:
      details - Process details (ignored)
      Returns:
      1