Interface IResourcePoolingService

All Known Implementing Classes:
FrameworkResourcePoolingService

public interface IResourcePoolingService
  • Method Details

    • obtainResources

      @NotNull @NotNull List<String> obtainResources(@NotNull @NotNull List<String> resourceStrings, List<String> rejectedResources) throws InsufficientResourcesAvailableException

      Generate and return a list of resource that are available for use by the manager

      Convenience method for obtainResources(resourceStrings, rejectedResources, 10, 1, null, null)

      Parameters:
      resourceStrings - - A list of resource regex string used to generate the available resource pool to select from
      rejectedResources - - A list of resources to be excluded from selection
      Returns:
      - A list of available resources, at that time, other test runs may have acquired the same resources
      Throws:
      InsufficientResourcesAvailableException - - If unable to generate the return minimum
    • obtainResources

      @NotNull @NotNull List<String> obtainResources(@NotNull @NotNull List<String> resourceStrings, List<String> rejectedResources, IDynamicStatusStoreService dss, String keyPrefix) throws InsufficientResourcesAvailableException

      Generate and return a list of resource that are available for use by the manager

      Convenience method for obtainResources(resourceStrings, rejectedResources, 10, 1, dss, keyprefix)

      Parameters:
      resourceStrings - - A list of resource regex string used to generate the available resource pool to select from
      rejectedResources - - A list of resources to be excluded from selection
      dss -
      keyPrefix -
      Returns:
      - A list of available resources, at that time, other test runs may have acquired the same resources
      Throws:
      InsufficientResourcesAvailableException - - If unable to generate the return minimum
    • obtainResources

      @NotNull @NotNull List<String> obtainResources(@NotNull @NotNull List<String> resourceStrings, List<String> rejectedResources, int returnMinimum) throws InsufficientResourcesAvailableException

      Generate and return a list of resource that are available for use by the manager

      Convenience method for obtainResources(resourceStrings, rejectedResources, returnMinimum, 1, null, null)

      Parameters:
      resourceStrings - - A list of resource regex string used to generate the available resource pool to select from
      rejectedResources - - A list of resources to be excluded from selection
      returnMinimum - - The minimum number of resource names to generate
      Returns:
      - A list of available resources, at that time, other test runs may have acquired the same resources
      Throws:
      InsufficientResourcesAvailableException - - If unable to generate the return minimum
    • obtainResources

      @NotNull @NotNull List<String> obtainResources(@NotNull @NotNull List<String> resourceStrings, List<String> rejectedResources, int returnMinimum, IDynamicStatusStoreService dss, String keyPrefix) throws InsufficientResourcesAvailableException

      Generate and return a list of resource that are available for use by the manager

      Convenience method for obtainResources(resourceStrings, rejectedResources, returnMinimum, 1, dss, keyPrefix)

      Parameters:
      resourceStrings - - A list of resource regex string used to generate the available resource pool to select from
      rejectedResources - - A list of resources to be excluded from selection
      returnMinimum - - The minimum number of resource names to generate
      dss - - The Dynamic Status Store to check if the resource exists, can be null
      keyPrefix - - The prefix key for the resource in the DSS, can be null if dss is null
      Returns:
      - A list of available resources, at that time, other test runs may have acquired the same resources
      Throws:
      InsufficientResourcesAvailableException - - If unable to generate the return minimum
    • obtainResources

      @NotNull @NotNull List<String> obtainResources(@NotNull @NotNull List<String> resourceStrings, List<String> rejectedResources, int returnMinimum, int returnConsecutive) throws InsufficientResourcesAvailableException

      Generate and return a list of resource that are available for use by the manager

      Convenience method for obtainResources(resourceStrings, rejectedResources, returnMinimum, returnConsecutive, null, null)

      Parameters:
      resourceStrings - - A list of resource regex string used to generate the available resource pool to select from
      rejectedResources - - A list of resources to be excluded from selection
      returnMinimum - - The minimum number of resource names to generate
      returnConsecutive - - The number of consecutive resource names to return (must be a modular of return minimum)
      Returns:
      - A list of available resources, at that time, other test runs may have acquired the same resources
      Throws:
      InsufficientResourcesAvailableException - - If unable to generate the return minimum
    • obtainResources

      @NotNull @NotNull List<String> obtainResources(@NotNull @NotNull List<String> resourceStrings, List<String> rejectedResources, int returnMinimum, int returnConsecutive, IDynamicStatusStoreService dss, String keyPrefix) throws InsufficientResourcesAvailableException

      Generate and return a list of resources that available for use by the manager. If the dss and a keyPrefix is provided, then this routine will check the if the key exists in the dss, if it does, the resource is deemed in use

      Parameters:
      resourceStrings - - A list of resource regex string used to generate the available resource pool to select from
      rejectedResources - - A list of resources to be excluded from selection
      returnMinimum - - The minimum number of resource names to generate
      returnConsecutive - - The number of consecutive resource names to return (must be a modular of return minimum)
      dss - - The Dynamic Status Store to check if the resource exists, can be null
      keyPrefix - - The prefix key for the resource in the DSS, can be null if dss is null
      Returns:
      - A list of available resources, at that time, other test runs may have acquired the same resources
      Throws:
      InsufficientResourcesAvailableException - - If unable to generate the return minimum