NAME

IO::Storm::Bolt - The base class for all IO::Storm Bolts.

VERSION

version 0.14

NAME

IO::Storm::Bolt - The base class for all IO::Storm Bolts.

VERSION

version 0.06

METHODS

initialize

Called immediately after the initial handshake with Storm and before the main run loop. A good place to initialize connections to data sources.

process

Process a single tuple of input. This should be overriden by subclasses

emit

Emit a tuple to a stream.

:param tuple: the Tuple payload to send to Storm, should contain only JSON-serializable data. :type tuple: arrayref :param stream: the ID of the stream to emit this tuple to. Specify ``undef`` to emit to default stream. :type stream: scalar :param anchors: IDs of the tuples (or the <IO::Storm::Tuple> instances) which the emitted tuples should be anchored to. If ``auto_anchor`` is set and you have not specified ``anchors``, ``anchors`` will be set to the incoming/most recent tuple ID(s). :type anchors: arrayref :param direct_task: the task to send the tuple to. :type direct_task: scalar

ack

Acknowledge a tuple. Argument can be either a Tuple or an ID.

fail

Fail a tuple. Argument can be either a Tuple or an ID.

run

Main run loop for all bolts.

Performs initial handshake with Storm and reads tuples handing them off to subclasses. Any exceptions are caught and logged back to Storm prior to the Perl process exiting.

Subclasses should **not** override this method.

AUTHORS

  • Cory G Watson <gphat@cpan.org>

  • Dan Blanchard <dblanchard@ets.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Infinity Interactive, Inc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

AUTHORS

  • Dan Blanchard <dblanchard@ets.org>

  • Cory G Watson <gphat@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Educational Testing Service.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.