Description Usage Arguments Value Warning Additional Info Author(s) See Also Examples
Function to create a Bolt object. A Bolt object consists of a function which receives as its first argument the Tuple emitted by the element the Bolt listens to.
1 | Bolt(FUNC, listen = 0, boltID = 0)
|
FUNC |
a |
listen |
a number indicating which element in the topology to listen too. $0$ indicates the Spout itself, while other integers refer to the Tuples emitted by other Bolts along the Stream. Default is $0$. Printing the Topology allows one to see the position number of each Bolt. |
boltID |
(optional) the ID of this bolt. A given name – mostly a number – to pass the name of the bolt to the bolt itself which can be used to create (e.g.) a hashMap that is distinct for the current bolt. |
An object of type Bolt which is a list containing the following elements:
name |
the name of the function that was passed when initializing the Bolt |
func |
the function itself |
listen |
the identifier of the element in the stream from which the Bolt receives its Tuples |
id |
the id of the current Bolt |
Functions used as bolt in a stream should always use the dots argument (...) to facilitate the internal working of RStorm.
The is.Bolt function checks whether an object is of Type Bolt and is used internally.
Maurits Kaptein
See Also: Topology, AddBolt, RStorm
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.