org.apache.hadoop.security.token

## Class TokenRenewer

- java.lang.Object
- - org.apache.hadoop.security.token.TokenRenewer

- Direct Known Subclasses:
    Token.TrivialRenewer

      @InterfaceAudience.Public
       @InterfaceStability.Evolving
      public abstract class TokenRenewer
      extends Object

  This is the interface for plugins that handle tokens.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenRenewer()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `cancel(Token<?> token, Configuration conf)` Cancel the given token
    `abstract boolean` | `handleKind(Text kind)` Does this renewer handle this kind of token?
    `abstract boolean` | `isManaged(Token<?> token)` Is the given token managed? Only managed tokens may be renewed or cancelled.
    `abstract long` | `renew(Token<?> token, Configuration conf)` Renew the given token.

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

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

- - ### Constructor Detail

    - #### TokenRenewer

          public TokenRenewer()

  - ### Method Detail

    - #### handleKind

          public abstract boolean handleKind(Text kind)

      Does this renewer handle this kind of token?
      Parameters:
        `kind` - the kind of the token
      Returns:
        true if this renewer can renew it

    - #### isManaged

          public abstract boolean isManaged(Token<?> token)
                                     throws IOException

      Is the given token managed? Only managed tokens may be renewed or cancelled.
      Parameters:
        `token` - the token being checked
      Returns:
        true if the token may be renewed or cancelled
      Throws:
        `IOException`

    - #### renew

          public abstract long renew(Token<?> token,
                                     Configuration conf)
                              throws IOException,
                                     InterruptedException

      Renew the given token.
      Returns:
        the new expiration time
      Throws:
        `IOException`
        `InterruptedException`

    - #### cancel

          public abstract void cancel(Token<?> token,
                                      Configuration conf)
                               throws IOException,
                                      InterruptedException

      Cancel the given token
      Throws:
        `IOException`
        `InterruptedException`

Copyright © 2022 Apache Software Foundation. All rights reserved.