Enum ClusterExecutionPolicy

  • All Implemented Interfaces:
    Serializable, Comparable<ClusterExecutionPolicy>

    public enum ClusterExecutionPolicy
    extends Enum<ClusterExecutionPolicy>
    ClusterExecutionPolicy controls how which nodes commands submitted via ClusterExecutor. That is the user can ensure that a command goes or doesn't go to a specific physical location such as on the existing machine, rack or site.

    ClusterExecutionPolicy effectively scopes execution of commands to a subset of nodes. For example, someone might want to exclusively execute commands on a local network site instead of a backup remote network centre as well. Others might, for example, use only a dedicated subset of a certain Infinispan rack nodes for specific task execution.

    Since:
    9.0
    Author:
    William Burns
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALL
      The command can be executed on any node in the cluster
      DIFFERENT_MACHINE
      The command will be executed only on a different machine.
      DIFFERENT_RACK
      The command will be executed on machine on a different rack.
      DIFFERENT_SITE
      The command will be executed on a different site.
      SAME_MACHINE
      The command can be executed only on the same machine from where it was initiated.
      SAME_RACK
      The command will be executed on a machine on the same rack.
      SAME_SITE
      The command will be executed on a machine on the same site.
    • Enum Constant Detail

      • SAME_MACHINE

        public static final ClusterExecutionPolicy SAME_MACHINE
        The command can be executed only on the same machine from where it was initiated. Note this implies same rack and same site.
      • DIFFERENT_MACHINE

        public static final ClusterExecutionPolicy DIFFERENT_MACHINE
        The command will be executed only on a different machine. Note this means it may or may not be on the same rack or site.
      • SAME_RACK

        public static final ClusterExecutionPolicy SAME_RACK
        The command will be executed on a machine on the same rack. Note this means it may or may not be executed on the same machine.
      • DIFFERENT_RACK

        public static final ClusterExecutionPolicy DIFFERENT_RACK
        The command will be executed on machine on a different rack. Note this means may or may not be on the same site.
      • SAME_SITE

        public static final ClusterExecutionPolicy SAME_SITE
        The command will be executed on a machine on the same site. Note this means it may or may not be executed on the same machine or even same rack.
      • DIFFERENT_SITE

        public static final ClusterExecutionPolicy DIFFERENT_SITE
        The command will be executed on a different site.
    • Method Detail

      • values

        public static ClusterExecutionPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ClusterExecutionPolicy c : ClusterExecutionPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ClusterExecutionPolicy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • include

        public abstract boolean include​(org.infinispan.remoting.transport.TopologyAwareAddress thisAddress,
                                        org.infinispan.remoting.transport.TopologyAwareAddress otherAddress)