Class TimeSpec

java.lang.Object
org.jboss.as.threads.TimeSpec
All Implemented Interfaces:
Serializable

public final class TimeSpec extends Object implements Serializable
A specification of a simple duration.
Author:
David M. Lloyd
See Also:
  • Field Details

    • DEFAULT_KEEPALIVE

      public static final TimeSpec DEFAULT_KEEPALIVE
  • Constructor Details

    • TimeSpec

      public TimeSpec(TimeUnit unit, long duration)
      Construct a new instance.
      Parameters:
      unit - the unit of time
      duration - the quantity of units
  • Method Details

    • getUnit

      public TimeUnit getUnit()
      Get the time unit.
      Returns:
      the time unit
    • getDuration

      public long getDuration()
      Get the duration.
      Returns:
      the duration
    • elementHash

      public long elementHash()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(TimeSpec obj)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object