Package org.apache.velocity.runtime.configuration

Examples of org.apache.velocity.runtime.configuration.Configuration


     * Load the persisted state of the repository from disk
     */
    private synchronized void load() {

        Map store = new HashMap();
        Configuration config = null;

        logger.info( "Restoring the URLs from disk: " + path );

        try {
            config = new Configuration( path );

            int count = 1;
            String url = null;

            while ( ( url = ( config
                              .getString("entry."+count+".url") ) ) != null ) {
                //Intern the url to ensure we can use "==" to compare
                //and synchronize on it
                url = url.intern();
                int status = config.getInteger("entry."+count+".status", URLManagerService.STATUS_OK );
                if( store.get( url ) == null )
                    store.put( url, new URLInfo( url, status ) );
                count++;
            }

View Full Code Here

TOP

Related Classes of org.apache.velocity.runtime.configuration.Configuration

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.