Interface ExecutionStrategy

All Known Subinterfaces:
ConnectExecutionStrategy, GrpcExecutionStrategy, HttpExecutionStrategy
All Known Implementing Classes:
ConnectAndHttpExecutionStrategy

public interface ExecutionStrategy
An execution strategy for all transports.

Implementations should not override the default Object.equals(Object) and Object.hashCode() method implementations. Default instance equality and hash-code behavior should be consistent across all instances.

  • Method Details

    • hasOffloads

      default boolean hasOffloads()
      Returns true if the instance has offloading for any operation.
      Returns:
      true if the instance has offloading for any operation.
    • isCloseOffloaded

      boolean isCloseOffloaded()
      Returns true if signals on the Completable returned by asynchronous close operations, usually ListenableAsyncCloseable, are offloaded, otherwise false if the signals may not be offloaded.
      Returns:
      true if signals on the Completable returned by asynchronous close operations are offloaded, otherwise falseif the signals may not be offloaded.
    • offloadNone

      static ExecutionStrategy offloadNone()
      Returns an ExecutionStrategy that requires no offloading and is compatible with all other offloading strategies.
      Returns:
      an ExecutionStrategy that requires no offloading.
    • offloadAll

      static ExecutionStrategy offloadAll()
      Returns an ExecutionStrategy that requires offloading for all actions.
      Returns:
      an ExecutionStrategy that requires offloading.
    • merge

      default ExecutionStrategy merge(ExecutionStrategy other)
      Combines this execution strategy with another execution strategy.
      Parameters:
      other - The other execution strategy to combine.
      Returns:
      The combined execution strategy.