class DataStore implements DataCacheProvider, RolesProvider {

    public void init() {
        
        /* now let's retrieve the list of locally saved domains */

        List<String> localDomainList = changeLogStore.getLocalDomainList();

        /* if we are not able to successfully process our local domains
         * then we're going to ask our store to reset the changes
         * and give us the list of all domains from ZMS */

        int badDomains = processLocalDomains(localDomainList);
        if (badDomains == -1) {
            
            changeLogStore.setLastModificationTimestamp(null);
            
            /* if we have decided that we need to a full refresh
             * we need to clean up and remove any cached domains */

            for (String domainName : localDomainList) {
                deleteDomain(domainName);
            }
        }
        
        /* after our local files have been processed now we need to
         * retrieve the domains that were modified since the last
         * modification time */

        if (!processDomainUpdates()) {
            throw new ResourceException(ResourceException.INTERNAL_SERVER_ERROR,
                    "Unable to initialize storage subsystem");
        }

        /* if we had received any errors when processing local
         * domains then we're going to run a domain check and
         * verify all domains vs their modified timestamp in zms */

        if (badDomains > 0) {
            processDomainChecks();
        }

        /* Start our monitoring thread to get changes from ZMS */

        ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(1);
        scheduledThreadPool.scheduleAtFixedRate(new DataUpdater(), updDomainRefreshTime,
                updDomainRefreshTime, TimeUnit.SECONDS);
    }

    public  DataStore(ChangeLogStore clogStore, CloudStore cloudStore);

}