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 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.