Enum Class ReconnectStrategy

java.lang.Object
java.lang.Enum<ReconnectStrategy>
ru.pathcreator.pyc.rpc.core.ReconnectStrategy
All Implemented Interfaces:
Serializable, Comparable<ReconnectStrategy>, Constable

public enum ReconnectStrategy extends Enum<ReconnectStrategy>
Стратегия поведения, когда вызов стартует при временно disconnected канале.

Strategy used when a call starts while the channel is temporarily disconnected.

  • Enum Constant Details

    • FAIL_FAST

      public static final ReconnectStrategy FAIL_FAST
      Сразу завершить вызов ошибкой, если канал не connected.

      Fail immediately if the channel is not connected.

    • WAIT_FOR_CONNECTION

      public static final ReconnectStrategy WAIT_FOR_CONNECTION
      Ждать, пока текущие Aeron publication и heartbeat снова станут connected.

      Wait until the existing Aeron publication and heartbeat become connected again.

    • RECREATE_ON_DISCONNECT

      public static final ReconnectStrategy RECREATE_ON_DISCONNECT
      Пересоздать локальную пару publication/subscription при disconnect, а затем ждать, пока пересозданный путь станет connected.

      Recreate the local publication/subscription pair when the transport is disconnected, then wait for the recreated path to become connected.

      Это дороже, чем WAIT_FOR_CONNECTION, и должно рассматриваться как opt-in recovery mode для сред, где локальные ресурсы канала могут требовать rebuild после disconnect.

      This is more expensive than WAIT_FOR_CONNECTION and should be treated as an opt-in recovery mode for environments where local channel resources may need to be rebuilt after a disconnect.

  • Method Details

    • values

      public static ReconnectStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ReconnectStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null