Interface ResourceGovernor


@Beta public interface ResourceGovernor
An interface responsible for taking a decision on how to deal with some resource intensive operations. PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
  • Method Details

    • beginExecution

      @Beta ExecutionContext beginExecution(ExecutionInformation executionData) throws ExecutionRejectedException
      Must be invoked before the operation. PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
      Parameters:
      executionData - describes the operation. It allows the implementation to decide what to do.
      Returns:
      context which should be closed when the operation ends.
      Throws:
      ExecutionRejectedException - when the implementation decides the operation cannot be executed.
    • fromCurrentOperationInfo

      @Beta ExecutionInformationBuilder fromCurrentOperationInfo(String operationType)
      Creates a builder with some fields already filled from the current OperationInfo PLEASE NOTE: This API is in the beta stage, it can be changed or even removed in a future release. Compatibility with other features is not guaranteed.
      Parameters:
      operationType - type of the operation
      Returns:
      builder which allows you to provide additional information