public class ADLSTokenCredential extends java.lang.Object implements Credential
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ADLS_DOMAIN
ADLS base domain
|
static java.lang.String |
ADLS_TOKEN_CREDENTIAL_TYPE
ADLS token credential type.
|
static java.lang.String |
GRAVITINO_ADLS_SAS_TOKEN
ADLS SAS token used to access ADLS data.
|
static java.lang.String |
GRAVITINO_AZURE_STORAGE_ACCOUNT_NAME
ADLS storage account name
|
CREDENTIAL_TYPE, EXPIRE_TIME_IN_MS| Constructor and Description |
|---|
ADLSTokenCredential()
This is the constructor that is used by credential factory to create an instance of credential
according to the credential information.
|
ADLSTokenCredential(java.lang.String accountName,
java.lang.String sasToken,
long expireTimeInMS)
Constructs an instance of
ADLSTokenCredential with SAS token. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
accountName()
Get ADLS account name
|
java.util.Map<java.lang.String,java.lang.String> |
credentialInfo()
Returns credential information.
|
java.lang.String |
credentialType()
Returns the type of the credential.
|
long |
expireTimeInMs()
Returns the expiration time of the credential in milliseconds since the epoch, 0 means not
expire.
|
void |
initialize(java.util.Map<java.lang.String,java.lang.String> credentialInfo,
long expireTimeInMS)
Initialize the credential with the credential information.
|
java.lang.String |
sasToken()
Get ADLS SAS token.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoPropertiespublic static final java.lang.String ADLS_TOKEN_CREDENTIAL_TYPE
public static final java.lang.String ADLS_DOMAIN
public static final java.lang.String GRAVITINO_AZURE_STORAGE_ACCOUNT_NAME
public static final java.lang.String GRAVITINO_ADLS_SAS_TOKEN
public ADLSTokenCredential(java.lang.String accountName,
java.lang.String sasToken,
long expireTimeInMS)
ADLSTokenCredential with SAS token.accountName - The ADLS account name.sasToken - The ADLS SAS token.expireTimeInMS - The SAS token expire time in ms.public ADLSTokenCredential()
public java.lang.String credentialType()
CredentialcredentialType in interface Credentialpublic long expireTimeInMs()
CredentialexpireTimeInMs in interface Credentialpublic java.util.Map<java.lang.String,java.lang.String> credentialInfo()
CredentialcredentialInfo in interface Credentialpublic void initialize(java.util.Map<java.lang.String,java.lang.String> credentialInfo,
long expireTimeInMS)
CredentialThis method is invoked to deserialize the credential in client side.
initialize in interface CredentialcredentialInfo - The credential information from Credential.credentialInfo().expireTimeInMS - The expire-time from Credential.expireTimeInMs().public java.lang.String accountName()
public java.lang.String sasToken()