Package org.apache.hadoop.security.token
Class Token.TrivialRenewer
java.lang.Object
org.apache.hadoop.security.token.TokenRenewer
org.apache.hadoop.security.token.Token.TrivialRenewer
- Enclosing class:
- Token<T extends TokenIdentifier>
A trivial renewer for token kinds that aren't managed. Sub-classes need
to implement getKind for their token kind.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(Token<?> token, Configuration conf) Cancel the given token.protected TextgetKind()booleanhandleKind(Text kind) Does this renewer handle this kind of token?booleanIs the given token managed?longrenew(Token<?> token, Configuration conf) Renew the given token.
-
Constructor Details
-
TrivialRenewer
public TrivialRenewer()
-
-
Method Details
-
getKind
-
handleKind
Description copied from class:TokenRenewerDoes this renewer handle this kind of token?- Specified by:
handleKindin classTokenRenewer- Parameters:
kind- the kind of the token- Returns:
- true if this renewer can renew it
-
isManaged
Description copied from class:TokenRenewerIs the given token managed? Only managed tokens may be renewed or cancelled.- Specified by:
isManagedin classTokenRenewer- Parameters:
token- the token being checked- Returns:
- true if the token may be renewed or cancelled
-
renew
Description copied from class:TokenRenewerRenew the given token.- Specified by:
renewin classTokenRenewer- Parameters:
token- the token being checked.conf- configuration.- Returns:
- the new expiration time.
-
cancel
Description copied from class:TokenRenewerCancel the given token.- Specified by:
cancelin classTokenRenewer- 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.
-