-
- All Implemented Interfaces:
-
org.xyro.kumulus.KumulusEmitter
public final class KumulusTopology implements KumulusEmitter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classKumulusTopology.Companionpublic final classKumulusTopology.KumulusTopologyCrashedException
-
Field Summary
Fields Modifier and Type Field Description private Function4<String, Integer, Long, Tuple, Unit>onBusyBoltHookprivate Function3<String, Integer, Long, Unit>onBoltPrepareFinishHookprivate Function3<String, Integer, Throwable, Unit>onReportErrorHookprivate final IntegercurrentThreadsInUseprivate final IntegermaxThreadsInUseprivate final IntegermaxQueueSize
-
Constructor Summary
Constructors Constructor Description KumulusTopology(List<KumulusComponent> components, Map<String, Object> config)
-
Method Summary
-
-
Constructor Detail
-
KumulusTopology
KumulusTopology(List<KumulusComponent> components, Map<String, Object> config)
-
-
Method Detail
-
prepare
final Unit prepare(Long time, TimeUnit unit)
Do the prepare phase of the topology
- Parameters:
time- timeout durationunit- timeout duration unit
-
start
final Unit start(Boolean block)
Start the topology spout polling
- Parameters:
block- should the call block until the topology os stopped
-
getDestinations
List<KumulusComponent> getDestinations(List<Integer> tasks)
-
execute
Unit execute(KumulusComponent destComponent, KumulusTuple kumulusTuple)
-
completeMessageProcessing
Unit completeMessageProcessing(KumulusSpout spout, Object spoutMessageId, List<Integer> timeoutTasks, List<Integer> failedTasks, Function0<Unit> callback)
-
throwException
Unit throwException(Throwable t)
-
resetMetrics
final Unit resetMetrics()
-
getOnBusyBoltHook
final Function4<String, Integer, Long, Tuple, Unit> getOnBusyBoltHook()
-
getOnBoltPrepareFinishHook
final Function3<String, Integer, Long, Unit> getOnBoltPrepareFinishHook()
-
getOnReportErrorHook
final Function3<String, Integer, Throwable, Unit> getOnReportErrorHook()
-
getCurrentThreadsInUse
final Integer getCurrentThreadsInUse()
-
getMaxThreadsInUse
final Integer getMaxThreadsInUse()
-
getMaxQueueSize
final Integer getMaxQueueSize()
-
setOnBusyBoltHook
final Unit setOnBusyBoltHook(Function4<String, Integer, Long, Tuple, Unit> onBusyBoltHook)
-
setOnBoltPrepareFinishHook
final Unit setOnBoltPrepareFinishHook(Function3<String, Integer, Long, Unit> onBoltPrepareFinishHook)
-
-
-
-