Package org.lilyproject.runtime.configuration.ConfSource

Examples of org.lilyproject.runtime.configuration.ConfSource.CachedConfig


        }

        public boolean refresh() {
            boolean changes = false;
            for (int i = 0; i < sources.size(); i++) {
                CachedConfig cachedConfig = sources.get(i).get(path);
                if (cachedConfig == null) {
                    if (lastModifieds[i] != null) {
                        lastModifieds[i] = null;
                        changes = true;
                    }
                } else if (lastModifieds[i] == null || cachedConfig.lastModified != lastModifieds[i]) {
                    lastModifieds[i] = cachedConfig.lastModified;
                    changes = true;
                }
            }

            if (changes) {
                List<ConfImpl> confs = new ArrayList<ConfImpl>();
                for (ConfSource source : sources) {
                    CachedConfig cachedConfig = source.get(path);
                    if (cachedConfig != null) {
                        confs.add(cachedConfig.conf);
                    }
                }
View Full Code Here

TOP

Related Classes of org.lilyproject.runtime.configuration.ConfSource.CachedConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.