Enum Class WanPublisherState

java.lang.Object
java.lang.Enum<WanPublisherState>
com.hazelcast.wan.WanPublisherState
All Implemented Interfaces:
Serializable, Comparable<WanPublisherState>, Constable

public enum WanPublisherState extends Enum<WanPublisherState>
Defines the state in which a WAN publisher can be in if it is not shutting down.
  • Enum Constant Details

    • REPLICATING

      public static final WanPublisherState REPLICATING
      State where both enqueuing new events is allowed, enqueued events are replicated to the target cluster and WAN sync is enabled. The publisher is most often in REPLICATING state when the target cluster is operational.
    • PAUSED

      public static final WanPublisherState PAUSED
      State where new events are enqueued, but they are not dequeued. Some events which have been dequeued before the state was switched may still be replicated to the target cluster but further events will not be replicated. WAN sync is enabled. For instance, this state may be useful if you know that the target cluster is temporarily unavailable (is under maintenance) and that the WAN queues can hold as many events as is necessary to reconcile the state between two clusters once the target cluster becomes available.
    • STOPPED

      public static final WanPublisherState STOPPED
      State where neither new events are enqueued nor dequeued. As with the PAUSED state, some events might still be replicated after the publisher has switched to this state. WAN sync is enabled. For instance, this state may be useful if you know that the target cluster is being shut down, decommissioned and being put out of use and that it will never come back. In such cases, you may additionally clear the WAN queues to release the consumed heap after the publisher has been switched into this state. Another example would be starting a publisher in STOPPED state. This may be the case where you know that the target cluster is not initially available and will be unavailable for a definite period but at some point it will become available. Once it becomes available, you can then switch the publisher state to REPLICATING to begin replicating to that cluster.
      See Also:
      • WanReplicationService.removeWanEvents(String, String)
  • Method Details

    • values

      public static WanPublisherState[] 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 WanPublisherState 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
    • getByType

      public static WanPublisherState getByType(byte id)
      Returns the WanPublisherState as an enum.
    • isEnqueueNewEvents

      public boolean isEnqueueNewEvents()
      Returns true if this state allows enqueueing new events, false otherwise.
    • isReplicateEnqueuedEvents

      public boolean isReplicateEnqueuedEvents()
      Returns true if this state allows dequeueing and replicating events, false otherwise.
    • getId

      public byte getId()
      Returns the ID of the WAN publisher state.