Search in sources :

Example 1 with KeyManagerHolder

use of org.wso2.carbon.apimgt.impl.factory.KeyManagerHolder in project carbon-apimgt by wso2.

the class KeyManagerHolder method getTenantKeyManagerDto.

private static OrganizationKeyManagerDto getTenantKeyManagerDto(String tenantDomain) {
    OrganizationKeyManagerDto organizationKeyManagerDto = organizationWiseMap.get(tenantDomain);
    if (organizationKeyManagerDto == null) {
        synchronized ("KeyManagerHolder".concat(tenantDomain)) {
            if (organizationKeyManagerDto == null) {
                new KeyManagerConfigurationDataRetriever(tenantDomain).run();
                organizationKeyManagerDto = organizationWiseMap.get(tenantDomain);
            }
        }
    }
    return organizationKeyManagerDto;
}
Also used : KeyManagerConfigurationDataRetriever(org.wso2.carbon.apimgt.impl.loader.KeyManagerConfigurationDataRetriever) OrganizationKeyManagerDto(org.wso2.carbon.apimgt.impl.dto.OrganizationKeyManagerDto)

Aggregations

OrganizationKeyManagerDto (org.wso2.carbon.apimgt.impl.dto.OrganizationKeyManagerDto)1 KeyManagerConfigurationDataRetriever (org.wso2.carbon.apimgt.impl.loader.KeyManagerConfigurationDataRetriever)1