Class CredentialDTO
java.lang.Object
org.apache.gravitino.dto.credential.CredentialDTO
- All Implemented Interfaces:
Credential
Represents a credential Data Transfer Object (DTO).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for constructing CredentialDTO instances. -
Field Summary
Fields inherited from interface org.apache.gravitino.credential.Credential
CREDENTIAL_TYPE, EXPIRE_TIME_IN_MS -
Method Summary
Modifier and TypeMethodDescriptionstatic CredentialDTO.Builderbuilder()Returns credential information.Returns the type of the credential.booleanlongReturns the expiration time of the credential in milliseconds since the epoch, 0 means not expire.inthashCode()voidinitialize(Map<String, String> credentialInfo, long expireTimeInMs) Initialize the credential with the credential information.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.gravitino.credential.Credential
toProperties
-
Method Details
-
equals
-
hashCode
public int hashCode() -
credentialType
Description copied from interface:CredentialReturns the type of the credential. It should be the same as the credential type of the credential provider.- Specified by:
credentialTypein interfaceCredential- Returns:
- the credential type as a String.
-
expireTimeInMs
public long expireTimeInMs()Description copied from interface:CredentialReturns the expiration time of the credential in milliseconds since the epoch, 0 means not expire.- Specified by:
expireTimeInMsin interfaceCredential- Returns:
- the expiration time as a long.
-
credentialInfo
Description copied from interface:CredentialReturns credential information.- Specified by:
credentialInfoin interfaceCredential- Returns:
- a map of credential information.
-
initialize
Description copied from interface:CredentialInitialize the credential with the credential information.This method is invoked to deserialize the credential in client side.
- Specified by:
initializein interfaceCredential- Parameters:
credentialInfo- The credential information fromCredential.credentialInfo().expireTimeInMs- The expire-time fromCredential.expireTimeInMs().
-
builder
- Returns:
- a new builder for constructing a Credential DTO.
-