Package org.apache.hadoop.security.token
Class TokenRenewer
java.lang.Object
org.apache.hadoop.security.token.TokenRenewer
- Direct Known Subclasses:
Token.TrivialRenewer
This is the interface for plugins that handle tokens.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcancel(Token<?> token, Configuration conf) Cancel the given token.abstract booleanhandleKind(Text kind) Does this renewer handle this kind of token?abstract booleanIs the given token managed?abstract longrenew(Token<?> token, Configuration conf) Renew the given token.
-
Constructor Details
-
TokenRenewer
public TokenRenewer()
-
-
Method Details
-
handleKind
Does this renewer handle this kind of token?- Parameters:
kind- the kind of the token- Returns:
- true if this renewer can renew it
-
isManaged
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.
-