Package org.apache.gravitino.credential
Class CredentialFactory
java.lang.Object
org.apache.gravitino.credential.CredentialFactory
Create a specific credential according to the credential information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Credential
Creates aCredential
instance based on the provided credential type, information, and expiration time.
-
Constructor Details
-
CredentialFactory
public CredentialFactory()
-
-
Method Details
-
create
public static Credential create(String credentialType, Map<String, String> credentialInfo, long expireTimeInMs) Creates aCredential
instance based on the provided credential type, information, and expiration time.- Parameters:
credentialType
- The type of the credential to be created. This string is used to look up the corresponding credential class.credentialInfo
- AMap
containing key-value pairs of information needed to initialize the credential.expireTimeInMs
- The expiration time of the credential in milliseconds.- Returns:
- A newly created and initialized
Credential
object.
-