class DataStore implements DataCacheProvider, RolesProvider {

    void processDomainPolicies(DomainData domainData, DataCache domainCache) {
        
        com.yahoo.athenz.zms.SignedPolicies signedPolicies = domainData.getPolicies();
        if (signedPolicies == null) {
            return;
        }
        
        com.yahoo.athenz.zms.DomainPolicies domainPolicies = signedPolicies.getContents();
        if (domainPolicies == null) {
            return;
        }
        
        List<com.yahoo.athenz.zms.Policy> policies = domainPolicies.getPolicies();
        if (policies == null) {
            return;
        }
        
        List<Role> roles = domainData.getRoles();
        HashMap<String, Role> roleMap  = new HashMap<>();
        for (Role role : roles) {
            roleMap.put(role.getName(), role);
        }
        for (com.yahoo.athenz.zms.Policy policy : policies) {
            domainCache.processPolicy(domainData.getName(), policy, roleMap);
        }
    }

    public  DataStore(ChangeLogStore clogStore, CloudStore cloudStore);

}