public abstract class Punchlets extends Punchlet
There are two variants : a sequence of punchlet, or more advanced dags of punchlet whenver multi-threaded partallelism is required.
Modifier and Type | Field and Description |
---|---|
protected List<Punchlet> |
punchletList
The list of individual punchlets
|
_threadLocal, LOG
child, code, eventCount, metricRegistry, r, uuidGenerator, world
Modifier | Constructor and Description |
---|---|
protected |
Punchlets(RuntimeContext runtimeContext) |
Modifier and Type | Method and Description |
---|---|
boolean |
__isChained()
some punchlet are made of a chain of several punchlets.
|
void |
activate()
The activate method is called after startup, and before receiving input
tuples.
|
Punchlet |
addEventCallback(PunchletEventCallback callback)
This method is not meant to be executed from within a punchlet.
|
boolean |
isAsynchronous()
Some punchlets generate asynchronous events.
|
Punchlet |
setMetricContext(org.thales.punch.libraries.metrics.api.IMetricContext metricsContext)
Associate a metric context with this punchlet.
|
attach, bug, cef, cidrRange, cidrRange, coalesce, contains, contains, convert, convert, csv, currentTimeMillis, currentTimeNanos, date, date, date, dissect, dump, fetchCsv, fetchCsv, fetchJson, fetchJson, findByInterval, findByInterval, findByInterval, findByKey, findByKey, geo, geoip, geoOperator, getAttachement, getCode, getHostIp, getHostName, getResource, getResourceString, getResourceTuple, getUniqueMessageId, grok, http, ipmatch, ipmatch, ipRange, ipv4Range, ipv4Range, ipv6Range, ipv6Range, is, kv, logger, mail, meter, move, nifi, print, print, raise, remove, sha1, sleep, split, syslogHeader, toArray, toBoolean, toDouble, toFlatTuple, toKv, toLong, toLowerCase, toUpperCase, tryEpochMs, tryEpochMs, tryEpochSec, tryEpochSec, tuple, tuple, unflatTuple, validateSchema
ecount, every, execute, getPath, getPersistentId, getProperties, getRuntimeId, getWorldTuple, invoke, setCode, setPath, setPersistentId, setProperties, setRuntimeId
protected Punchlets(RuntimeContext runtimeContext)
public Punchlet addEventCallback(PunchletEventCallback callback)
Punchlet
Register a callback to this punchlet. This is used for asynchronous style punchlets that generate events asynchronously, for example a punchlet with a time based siddhi rule. These events are represented as Tuples.
If you run punchlet from a java applicatin using the punchlet library, you must implement this in order to re-invoke yor punchlet with the raised events.
addEventCallback
in class Punchlet
callback
- the callback to be notified upon fired eventspublic boolean isAsynchronous()
Punchlet
PunchletEventCallback
to be notified.isAsynchronous
in class Punchlet
public void activate()
Punchlet
public Punchlet setMetricContext(org.thales.punch.libraries.metrics.api.IMetricContext metricsContext)
Punchlet
setMetricContext
in class Punchlet
metricsContext
- the provided metric contextpublic boolean __isChained()
__isChained
in class Punchlet
Copyright © 2022. All rights reserved.