public enum DirectEventProcessingStrategy extends Enum<DirectEventProcessingStrategy> implements EventProcessingStrategy
Enum Constant and Description |
---|
INSTANCE
Singleton instance of the
DirectEventProcessingStrategy . |
Modifier and Type | Method and Description |
---|---|
void |
handle(List<? extends EventMessage<?>> events,
Consumer<List<? extends EventMessage<?>>> processor)
Handle the given batch of
events . |
static DirectEventProcessingStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DirectEventProcessingStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DirectEventProcessingStrategy INSTANCE
DirectEventProcessingStrategy
.public static DirectEventProcessingStrategy[] values()
for (DirectEventProcessingStrategy c : DirectEventProcessingStrategy.values()) System.out.println(c);
public static DirectEventProcessingStrategy 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 void handle(@Nonnull List<? extends EventMessage<?>> events, @Nonnull Consumer<List<? extends EventMessage<?>>> processor)
EventProcessingStrategy
events
. Once the strategy decides it is opportune to process the events it
should pass them back to the given processor
.
Note that the strategy may call back to the processor more than once for a single invocation of this method. Also note that a batch of events passed back to the processor may be made up of events from different batches.
handle
in interface EventProcessingStrategy
events
- Events to be processedprocessor
- Callback method on the processor that carries out the actual processing of eventsCopyright © 2010–2024. All rights reserved.