class OzoneDelegationTokenSecretManager extends OzoneSecretManager<OzoneTokenIdentifier> {

  public Token<OzoneTokenIdentifier> createToken(Text owner, Text renewer,
      Text realUser)
      throws IOException {
    OzoneTokenIdentifier identifier = createIdentifier(owner, renewer,
        realUser);
    updateIdentifierDetails(identifier);

    byte[] password = createPassword(identifier.getBytes(),
        getCurrentKey().getPrivateKey());
    long expiryTime = identifier.getIssueDate() + getTokenRenewInterval();

    // For HA ratis will take care of updating.
    // This will be removed, when HA/Non-HA code is merged.
    if (!isRatisEnabled) {
      addToTokenStore(identifier, password, expiryTime);
    }

    Token<OzoneTokenIdentifier> token = new Token<>(identifier.getBytes(),
        password, identifier.getKind(), getService());
    if (LOG.isDebugEnabled()) {
      LOG.debug("Created delegation token: {}", token);
    }
    return token;
  }

  public  OzoneDelegationTokenSecretManager(Builder b);

}