org.apache.storm.topology.base

## Class BaseWindowedBolt.Duration

- java.lang.Object
- - org.apache.storm.topology.base.BaseWindowedBolt.Duration

- All Implemented Interfaces:
    Serializable
  Enclosing class:
    BaseWindowedBolt

      public static class BaseWindowedBolt.Duration
      extends Object
      implements Serializable

  Holds a Time duration for time based windows and sliding intervals.

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `value`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Duration(int value, TimeUnit timeUnit)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BaseWindowedBolt.Duration` | `days(int days)` Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in days.
    `boolean` | `equals(Object o)`
    `int` | `hashCode()`
    `static BaseWindowedBolt.Duration` | `hours(int hours)` Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in hours.
    `static BaseWindowedBolt.Duration` | `minutes(int minutes)` Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in minutes.
    `static BaseWindowedBolt.Duration` | `of(int milliseconds)` Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in milli seconds.
    `static BaseWindowedBolt.Duration` | `seconds(int seconds)` Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in seconds.
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### value

          public final int value

  - ### Constructor Detail

    - #### Duration

          public Duration(int value,
                          TimeUnit timeUnit)

  - ### Method Detail

    - #### of

          public static BaseWindowedBolt.Duration of(int milliseconds)

      Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in milli seconds.

      Parameters:
        `milliseconds` - the duration in milliseconds
      Returns:
        the Duration

    - #### days

          public static BaseWindowedBolt.Duration days(int days)

      Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in days.

      Parameters:
        `days` - the number of days
      Returns:
        the Duration

    - #### hours

          public static BaseWindowedBolt.Duration hours(int hours)

      Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in hours.

      Parameters:
        `hours` - the number of hours
      Returns:
        the Duration

    - #### minutes

          public static BaseWindowedBolt.Duration minutes(int minutes)

      Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in minutes.

      Parameters:
        `minutes` - the number of minutes
      Returns:
        the Duration

    - #### seconds

          public static BaseWindowedBolt.Duration seconds(int seconds)

      Returns a `BaseWindowedBolt.Duration` corresponding to the the given value in seconds.

      Parameters:
        `seconds` - the number of seconds
      Returns:
        the Duration

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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