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, LOGchild, 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, validateSchemaecount, every, execute, getPath, getPersistentId, getProperties, getRuntimeId, getWorldTuple, invoke, setCode, setPath, setPersistentId, setProperties, setRuntimeIdprotected Punchlets(RuntimeContext runtimeContext)
public Punchlet addEventCallback(PunchletEventCallback callback)
PunchletRegister 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 Punchletcallback - the callback to be notified upon fired eventspublic boolean isAsynchronous()
PunchletPunchletEventCallback
to be notified.isAsynchronous in class Punchletpublic void activate()
Punchletpublic Punchlet setMetricContext(org.thales.punch.libraries.metrics.api.IMetricContext metricsContext)
PunchletsetMetricContext in class PunchletmetricsContext - the provided metric contextpublic boolean __isChained()
__isChained in class PunchletCopyright © 2022. All rights reserved.