com.hazelcast.mapreduce

## Enum TopologyChangedStrategy

- java.lang.Object
- - java.lang.Enum<TopologyChangedStrategy>
  - - com.hazelcast.mapreduce.TopologyChangedStrategy

- All Implemented Interfaces:
    Serializable, Comparable<TopologyChangedStrategy>

  Deprecated.
  MapReduce is deprecated and will be removed in 4.0. For map aggregations, you can use `Aggregator` on IMap. For general data processing, it is superseded by Hazelcast Jet.

      @Deprecated
      public enum TopologyChangedStrategy
      extends Enum<TopologyChangedStrategy>

  This enum class is used to define how a map reduce job behaves if the job owner recognizes a topology changed event.
  When members are leaving the cluster, it might lose processed data chunks that were already send to the reducers on the leaving node.
  Also, on any topology change, there is a redistribution of the member assigned partitions, which means that a map job might have a problem finishing its currently processed partition.
  The default behavior is to immediately cancel the running task and throw an `TopologyChangedException`, but it is possible to submit the same job configuration again if `JobTracker.getTrackableJob(String)` returns null for the requested job ID.
  Since:
    3.2

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CANCEL_RUNNING_OPERATION` Deprecated. Default behavior.
    `DISCARD_AND_RESTART` Deprecated. Attention: This strategy is currently not available but reserved for later usage! Some or all processed data and intermediate results are discarded and the job is automatically restarted. Depending on the implementation, the job might start from an earlier reached safepoint and is not restarted at the beginning.
    `MIGRATE_AND_CONTINUE` Deprecated. Attention: This strategy is currently not available but reserved for later usage! Currently running processes define a safepoint, migrate gracefully and continue their work on new partition owners. If a member lefts the cluster intermediately reduced data are lost!

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TopologyChangedStrategy` | `valueOf(String name)` Deprecated. Returns the enum constant of this type with the specified name.
    `static TopologyChangedStrategy[]` | `values()` Deprecated. Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### CANCEL_RUNNING_OPERATION

          public static final TopologyChangedStrategy CANCEL_RUNNING_OPERATION

      Deprecated.
      Default behavior. The currently running job is cancelled immediately on recognizing the topology changed. An `TopologyChangedException` is thrown on the job owning node.

    - #### DISCARD_AND_RESTART

          public static final TopologyChangedStrategy DISCARD_AND_RESTART

      Deprecated.
      Attention: This strategy is currently not available but reserved for later usage!
      Some or all processed data and intermediate results are discarded and the job is automatically restarted.
      Depending on the implementation, the job might start from an earlier reached safepoint and is not restarted at the beginning.

    - #### MIGRATE_AND_CONTINUE

          public static final TopologyChangedStrategy MIGRATE_AND_CONTINUE

      Deprecated.
      Attention: This strategy is currently not available but reserved for later usage!
      Currently running processes define a safepoint, migrate gracefully and continue their work on new partition owners.
      If a member lefts the cluster intermediately reduced data are lost!

  - ### Method Detail

    - #### values

          public static TopologyChangedStrategy[] values()

      Deprecated.
      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 (TopologyChangedStrategy c : TopologyChangedStrategy.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static TopologyChangedStrategy valueOf(String name)

      Deprecated.
      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

Copyright © 2019. All rights reserved.