shouldApply abstract method

FutureOr<bool> shouldApply(
  1. OperationContext context
)

Determines whether the operation should be subjected to a resource policy.

Returns true if the resource control (e.g., cache, rate limit) should be applied; otherwise returns false.

Implementations may perform asynchronous evaluation when necessary, for example when querying an external expression resolver or configuration source.

@param context The OperationContext representing the current invocation @return true if the condition is satisfied and the policy should apply

Implementation

FutureOr<bool> shouldApply(OperationContext context);