org.apache.storm.hooks

## Class BaseWorkerHook

- java.lang.Object
- - org.apache.storm.hooks.BaseWorkerHook

- All Implemented Interfaces:
    Serializable, IWorkerHook

      public class BaseWorkerHook
      extends Object
      implements IWorkerHook, Serializable

  A BaseWorkerHook is a noop implementation of IWorkerHook. You may extends this class and implement any and/or all methods you need for your workers.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseWorkerHook()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `shutdown()` This method is called right before a worker shuts down.
    `void` | `start(Map<String,Object> topoConf, WorkerTopologyContext context)` This method is called when a worker is started.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BaseWorkerHook

          public BaseWorkerHook()

  - ### Method Detail

    - #### start

          public void start(Map<String,Object> topoConf,
                            WorkerTopologyContext context)

      This method is called when a worker is started.

      Specified by:
        `start` in interface `IWorkerHook`
      Parameters:
        `topoConf` - The Storm configuration for this worker
        `context` - This object can be used to get information about this worker’s place within the topology

    - #### shutdown

          public void shutdown()

      This method is called right before a worker shuts down.

      Specified by:
        `shutdown` in interface `IWorkerHook`

Copyright © 2021 The Apache Software Foundation. All rights reserved.