public enum WanPublisherState extends Enum<WanPublisherState>
Enum Constant and Description |
---|
PAUSED
State where new events are enqueued but they are not dequeued.
|
REPLICATING
State where both enqueuing new events is allowed, enqueued events are
replicated to the target cluster and WAN sync is enabled.
|
STOPPED
State where neither new events are enqueued nor dequeued.
|
Modifier and Type | Method and Description |
---|---|
static WanPublisherState |
getByType(byte id)
Returns the WanPublisherState as an enum.
|
byte |
getId()
Returns the ID of the WAN publisher state.
|
boolean |
isEnqueueNewEvents()
Returns
true if this state allows enqueueing new events,
false otherwise. |
boolean |
isReplicateEnqueuedEvents()
Returns
true if this state allows dequeueing and replicating
events, false otherwise. |
static WanPublisherState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WanPublisherState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WanPublisherState REPLICATING
public static final WanPublisherState PAUSED
public static final WanPublisherState STOPPED
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, decomissioned 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.
An 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.WanReplicationService.removeWanEvents(String, String)
public static WanPublisherState[] values()
for (WanPublisherState c : WanPublisherState.values()) System.out.println(c);
public static WanPublisherState valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static WanPublisherState getByType(byte id)
public boolean isEnqueueNewEvents()
true
if this state allows enqueueing new events,
false
otherwise.public boolean isReplicateEnqueuedEvents()
true
if this state allows dequeueing and replicating
events, false
otherwise.public byte getId()
Copyright © 2020 Hazelcast, Inc.. All rights reserved.