TokenRenewer (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.security.token, class: TokenRenewer

Package org.apache.hadoop.security.token

# Class TokenRenewer

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

Direct Known Subclasses:
  `Token.TrivialRenewer`

@Public @Evolving public abstract class TokenRenewer extends Object
This is the interface for plugins that handle tokens.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TokenRenewer()`

- ## Method Summary

  Modifier and Type
  Method
  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?
  `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 Details

  - ### TokenRenewer

    public TokenRenewer()

- ## Method Details

  - ### 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` - raised on errors performing I/O.

  - ### renew

    public abstract long renew(Token<?> token, Configuration conf) throws IOException, InterruptedException
    Renew the given token.
    Parameters:
      `token` - the token being checked.
      `conf` - configuration.
    Returns:
      the new expiration time.
    Throws:
      `IOException` - raised on errors performing I/O.
      `InterruptedException` - thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.

  - ### cancel

    public abstract void cancel(Token<?> token, Configuration conf) throws IOException, InterruptedException
    Cancel the given token.
    Parameters:
      `token` - the token being checked.
      `conf` - configuration.
    Throws:
      `IOException` - raised on errors performing I/O.
      `InterruptedException` - thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted, either before or during the activity.