public class AzureAccountKeyCredential extends java.lang.Object implements Credential
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AZURE_ACCOUNT_KEY_CREDENTIAL_TYPE
Azure account key credential type.
|
static java.lang.String |
GRAVITINO_AZURE_STORAGE_ACCOUNT_KEY
Azure storage account key
|
static java.lang.String |
GRAVITINO_AZURE_STORAGE_ACCOUNT_NAME
Azure storage account name
|
CREDENTIAL_TYPE, EXPIRE_TIME_IN_MS
Constructor and Description |
---|
AzureAccountKeyCredential()
This is the constructor that is used by credential factory to create an instance of credential
according to the credential information.
|
AzureAccountKeyCredential(java.lang.String accountName,
java.lang.String accountKey)
Constructs an instance of
AzureAccountKeyCredential . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
accountKey()
Get Azure account key
|
java.lang.String |
accountName()
Get Azure 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toProperties
public static final java.lang.String AZURE_ACCOUNT_KEY_CREDENTIAL_TYPE
public static final java.lang.String GRAVITINO_AZURE_STORAGE_ACCOUNT_NAME
public static final java.lang.String GRAVITINO_AZURE_STORAGE_ACCOUNT_KEY
public AzureAccountKeyCredential(java.lang.String accountName, java.lang.String accountKey)
AzureAccountKeyCredential
.accountName
- The Azure account name.accountKey
- The Azure account key.public AzureAccountKeyCredential()
public java.lang.String credentialType()
Credential
credentialType
in interface Credential
public long expireTimeInMs()
Credential
expireTimeInMs
in interface Credential
public java.util.Map<java.lang.String,java.lang.String> credentialInfo()
Credential
credentialInfo
in interface Credential
public void initialize(java.util.Map<java.lang.String,java.lang.String> credentialInfo, long expireTimeInMS)
Credential
This method is invoked to deserialize the credential in client side.
initialize
in interface Credential
credentialInfo
- The credential information from Credential.credentialInfo()
.expireTimeInMS
- The expire-time from Credential.expireTimeInMs()
.public java.lang.String accountName()
public java.lang.String accountKey()