public static enum Publisher.OnFailure extends Enum<Publisher.OnFailure> implements Publisher.Option<Object>
Publisher handles a failure of an individual
Publisher.send(V) call.| Enum Constant and Description |
|---|
Continue
If an individual
Publisher.send(Object) fails then skip that value and
continue to publish other values. |
Stop
If an individual
Publisher.send(V) fails then stop any further
publishing and close the Publisher. |
| Modifier and Type | Method and Description |
|---|---|
static Publisher.OnFailure |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Publisher.OnFailure[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Options.Default public static final Publisher.OnFailure Stop
Publisher.send(V) fails then stop any further
publishing and close the Publisher.
This option will maintain order as when a failure occurs no other
values will be sent to the NamedTopic.
public static final Publisher.OnFailure Continue
Publisher.send(Object) fails then skip that value and
continue to publish other values.
This option will not guarantee to maintain order as when a failure
occurs other further values will be still sent to the NamedTopic.
public static Publisher.OnFailure[] values()
for (Publisher.OnFailure c : Publisher.OnFailure.values()) System.out.println(c);
public static Publisher.OnFailure 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 null