## org.apache.hadoop.security.token
Class TokenRenewer

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

Direct Known Subclasses:
  JobClient.Renewer, Token.TrivialRenewer

    public abstract class TokenRenewer

extends Object

This is the interface for plugins that handle tokens.

Constructor Summary
`TokenRenewer()`

Method Summary
`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 © 2009 The Apache Software Foundation