Token (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.api.records, class: Token

Package org.apache.hadoop.yarn.api.records

# Class Token

java.lang.Object
org.apache.hadoop.yarn.api.records.Token

@Public @Stable public abstract class Token extends Object

`Token` is the security entity used by the framework to verify authenticity of any resource.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Token()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract ByteBuffer`
  `getIdentifier()`
  Get the token identifier.
  `abstract String`
  `getKind()`
  Get the token kind.
  `abstract ByteBuffer`
  `getPassword()`
  Get the token password
  `abstract String`
  `getService()`
  Get the service to which the token is allocated.
  `static Token`
  `newInstance(byte[] identifier, String kind, byte[] password, String service)`
  `abstract void`
  `setIdentifier(ByteBuffer identifier)`
  `abstract void`
  `setKind(String kind)`
  `abstract void`
  `setPassword(ByteBuffer password)`
  `abstract void`
  `setService(String service)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Token

    public Token()

- ## Method Details

  - ### newInstance

    @Private @Unstable public static Token newInstance(byte[] identifier, String kind, byte[] password, String service)

  - ### getIdentifier

    @Public @Stable public abstract ByteBuffer getIdentifier()
    Get the token identifier.
    Returns:
      token identifier

  - ### setIdentifier

    @Private @Unstable public abstract void setIdentifier(ByteBuffer identifier)

  - ### getPassword

    @Public @Stable public abstract ByteBuffer getPassword()
    Get the token password
    Returns:
      token password

  - ### setPassword

    @Private @Unstable public abstract void setPassword(ByteBuffer password)

  - ### getKind

    @Public @Stable public abstract String getKind()
    Get the token kind.
    Returns:
      token kind

  - ### setKind

    @Private @Unstable public abstract void setKind(String kind)

  - ### getService

    @Public @Stable public abstract String getService()
    Get the service to which the token is allocated.
    Returns:
      service to which the token is allocated

  - ### setService

    @Private @Unstable public abstract void setService(String service)