@InterfaceAudience.Public @InterfaceStability.Evolving public class Token<T extends TokenIdentifier> extends Object implements Writable
| 修飾子とタイプ | フィールドと説明 | 
|---|---|
| static org.apache.commons.logging.Log | LOG | 
| コンストラクタと説明 | 
|---|
| Token()Default constructor. | 
| Token(byte[] identifier,
     byte[] password,
     Text kind,
     Text service)Construct a token from the components. | 
| Token(org.apache.hadoop.security.proto.SecurityProtos.TokenProto tokenPB)Construct a Token from a TokenProto. | 
| Token(Token<T> other)Clone a token. | 
| Token(T id,
     SecretManager<T> mgr)Construct a token given a token identifier and a secret manager for the
 type of the token identifier. | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| String | buildCacheKey() | 
| void | cancel(Configuration conf)Cancel this delegation token. | 
| Token<T> | copyToken() | 
| void | decodeFromUrlString(String newValue)Decode the given url safe string into this token. | 
| T | decodeIdentifier()Get the token identifier object, or null if it could not be constructed
 (because the class could not be loaded, for example). | 
| String | encodeToUrlString()Encode this token as a url safe string. | 
| boolean | equals(Object right) | 
| byte[] | getIdentifier()Get the token identifier's byte representation. | 
| Text | getKind()Get the token kind. | 
| byte[] | getPassword()Get the token password/secret. | 
| Text | getService()Get the service on which the token is supposed to be used. | 
| int | hashCode() | 
| boolean | isManaged()Is this token managed so that it can be renewed or cancelled? | 
| void | readFields(DataInput in)Deserialize the fields of this object from  in. | 
| long | renew(Configuration conf)Renew this delegation token. | 
| void | setService(Text newService)Set the service on which the token is supposed to be used. | 
| String | toString() | 
| org.apache.hadoop.security.proto.SecurityProtos.TokenProto | toTokenProto()Construct a TokenProto from this Token instance. | 
| void | write(DataOutput out)Serialize the fields of this object to  out. | 
public static final org.apache.commons.logging.Log LOG
public Token(T id, SecretManager<T> mgr)
id - the token identifiermgr - the secret managerpublic Token(byte[] identifier, byte[] password, Text kind, Text service)
identifier - the token identifierpassword - the token's passwordkind - the kind of tokenservice - the service for this tokenpublic Token()
public Token(org.apache.hadoop.security.proto.SecurityProtos.TokenProto tokenPB)
tokenPB - the TokenProto objectpublic org.apache.hadoop.security.proto.SecurityProtos.TokenProto toTokenProto()
public byte[] getIdentifier()
public T decodeIdentifier() throws IOException
IOExceptionpublic byte[] getPassword()
public Text getService()
public void setService(Text newService)
newService - the service namepublic void readFields(DataInput in) throws IOException
Writablein.  
 
 For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields インタフェース内 Writablein - DataInput to deseriablize this object from.IOExceptionpublic void write(DataOutput out) throws IOException
Writableout.write インタフェース内 Writableout - DataOuput to serialize this object into.IOExceptionpublic String encodeToUrlString() throws IOException
IOExceptionpublic void decodeFromUrlString(String newValue) throws IOException
newValue - the encoded stringIOExceptionpublic String buildCacheKey()
public boolean isManaged() throws IOException
IOExceptionpublic long renew(Configuration conf) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void cancel(Configuration conf) throws IOException, InterruptedException
Copyright © 2016 Apache Software Foundation. All rights reserved.