Package com.github.ambry.router
Class SingleKeyManagementServiceFactory
- java.lang.Object
-
- com.github.ambry.router.SingleKeyManagementServiceFactory
-
- All Implemented Interfaces:
com.github.ambry.router.KeyManagementServiceFactory<javax.crypto.spec.SecretKeySpec>
public class SingleKeyManagementServiceFactory extends java.lang.Object implements com.github.ambry.router.KeyManagementServiceFactory<javax.crypto.spec.SecretKeySpec>
SingleKeyManagementServiceFactory
specific implementation ofKeyManagementServiceFactory
. Sets up all the supporting cast required for the operation ofSingleKeyManagementService
and returns a new instance ongetKeyManagementService()
. The default key that theSingleKeyManagementService
returns for anyKeyManagementService.getKey(short, short)
is fetched from config "kms.default.container.key" which has to be hex string.
-
-
Constructor Summary
Constructors Constructor Description SingleKeyManagementServiceFactory(com.github.ambry.config.VerifiableProperties verifiableProperties, java.lang.String clusterName, com.codahale.metrics.MetricRegistry registry)
InstantiatesSingleKeyManagementServiceFactory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.ambry.router.KeyManagementService<javax.crypto.spec.SecretKeySpec>
getKeyManagementService()
-
-
-
Constructor Detail
-
SingleKeyManagementServiceFactory
public SingleKeyManagementServiceFactory(com.github.ambry.config.VerifiableProperties verifiableProperties, java.lang.String clusterName, com.codahale.metrics.MetricRegistry registry)
InstantiatesSingleKeyManagementServiceFactory
- Parameters:
verifiableProperties
-VerifiableProperties
to load configs fromclusterName
- Cluster name for whichKeyManagementService
is requested forregistry
-MetricRegistry
to use
-
-
Method Detail
-
getKeyManagementService
public com.github.ambry.router.KeyManagementService<javax.crypto.spec.SecretKeySpec> getKeyManagementService() throws java.security.GeneralSecurityException
- Specified by:
getKeyManagementService
in interfacecom.github.ambry.router.KeyManagementServiceFactory<javax.crypto.spec.SecretKeySpec>
- Throws:
java.security.GeneralSecurityException
-
-