# Interface BuildServiceSpec<P extends BuildServiceParameters>

Type Parameters:
  `P` - The type of parameters to inject into the service implementation.

public interface BuildServiceSpec<P extends BuildServiceParameters>
A set of parameters that defines a service registration.

Since:
  6.1

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Property<Integer>`
  `getMaxParallelUsages()`
  Specifies the maximum number of tasks that can use this service in parallel.
  `P`
  `getParameters()`
  Returns the parameters to will be used to create the service instance.
  `void`
  `parameters(Action<? super P> configureAction)`
  Runs the given action to configure the parameters.

- ## Method Details

  - ### getParameters

    P getParameters()
    Returns the parameters to will be used to create the service instance.

    When the service declares `BuildServiceParameters.None` as its parameters type, this returns the `BuildServiceParameters.None` singleton.

    Since:
      6.1

  - ### parameters

    void parameters(Action<? super P> configureAction)
    Runs the given action to configure the parameters.

    The action is invoked even when the service declares `BuildServiceParameters.None` as its parameters type; in that case it receives the `BuildServiceParameters.None` singleton.

    Since:
      6.1

  - ### getMaxParallelUsages

    Property<Integer> getMaxParallelUsages()
    Specifies the maximum number of tasks that can use this service in parallel. Setting this to 1 means that the service will be used by a single task at a time. When this property has no value defined, then any number of tasks may use this service in parallel. This is the default.

    IMPORTANT: the build service must be consumed via a `ServiceReference` property, or explicitly registered with every using task via `Task#usesService` for this constraint to be honored.

    Since:
      6.1
    See Also:
      - `ServiceReference`
      - `Task.usesService(Provider)`