Class ScriptStateRouter<T>

java.lang.Object
org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter<T>
org.apache.dubbo.rpc.cluster.router.script.ScriptStateRouter<T>
All Implemented Interfaces:
StateRouter<T>

public class ScriptStateRouter<T> extends AbstractStateRouter<T>
ScriptRouter
  • Field Details

  • Constructor Details

    • ScriptStateRouter

      public ScriptStateRouter(org.apache.dubbo.common.URL url)
  • Method Details

    • isRuntime

      public boolean isRuntime()
      Description copied from interface: StateRouter
      To decide whether this router need to execute every time an RPC comes or should only execute when addresses or rule change.
      Specified by:
      isRuntime in interface StateRouter<T>
      Overrides:
      isRuntime in class AbstractStateRouter<T>
      Returns:
      true if the router need to execute every time.
    • isForce

      public boolean isForce()
      Description copied from interface: StateRouter
      To decide whether this router should take effect when none of the invoker can match the router rule, which means the StateRouter.route(BitList, URL, Invocation, boolean, Holder) would be empty. Most of time, most router implementation would default this value to false.
      Specified by:
      isForce in interface StateRouter<T>
      Overrides:
      isForce in class AbstractStateRouter<T>
      Returns:
      true to execute if none of invokers matches the current router