@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface BatchSourceTriggerer
| Modifier and Type | Method and Description |
|---|---|
void |
init(Map<String,Object> config,
SourceContext sourceContext)
initializes the Triggerer with given config.
|
void |
start(Consumer<String> trigger)
Triggerer should actually start looking out for trigger conditions.
|
void |
stop()
Triggerer should stop triggering.
|
void init(Map<String,Object> config, SourceContext sourceContext) throws Exception
config - config needed for triggerer to runsourceContext - The source context associated with the source
The parameter passed to this trigger function is an optional description of the event that caused the triggerException - throws any exceptions when initializingvoid start(Consumer<String> trigger)
trigger - The function to be called when its time to trigger the discover
This function can be passed any metadata about this particular
trigger event as its argument
This method should return immediately. It is expected that implementations will use their own mechanisms
to schedule the triggers.void stop()
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.