A Policy that can be replaced safely at runtime
- Companion:
- object
Value members
Abstract methods
Switches the policy to the new policy
Switches the policy to the new policy
After completion of this effect, it is guaranteed that new calls are executed with the new policy. Calls in flight before execution of the switch will be completed with the old policy.
The old policy will be released after those in-flight calls are completed. The inner UIO signals completion of release of the old policy.
- Value parameters:
- mode
Transition mode: Transition = Process new calls with the new policy while completing in-flight calls with the previous policy. FinishInFlight = Wait for completion of in-flight calls with the old policy before accepting
- newPolicy
The new policy to apply. Can be a policy that accepts a supertype of errors of the original policy.
Inherited methods
Apply another policy on top of this one
Apply another policy on top of this one
The other policy gets applied before this policy, i.e. policyA compose policyB means policyB { policyA { effect } }
- Value parameters:
- that
The other policy
- Inherited from:
- Policy