Package dev.db.biz.configuration.property

Examples of dev.db.biz.configuration.property.PropertyCacheInfo


    if( !cachePropertyFile ) {
      // disable cache
      return;
    }
   
    cacheInfo.put(cacheName, new PropertyCacheInfo(propertyFilename, properties, propertyFilename.lastModified()) );
    LOG.fine( "storing in cache " + cacheName );
  }
View Full Code Here


    cacheInfo.put(cacheName, new PropertyCacheInfo(propertyFilename, properties, propertyFilename.lastModified()) );
    LOG.fine( "storing in cache " + cacheName );
  }
 
  public Properties getFromCache( String cacheName ) {
    PropertyCacheInfo info = cacheInfo.get( cacheName );
   
    if( info == null ) {
      return null;
    }
   
    if( !info.getPropertyFilename().exists() ) {
      return null;
    }
   
    if( info.getPropertyFilename().lastModified() > info.getLastModified() ) {
      // property changed invalidate
      cacheInfo.remove( cacheName );
      LOG.fine( "invalidating from cache " + cacheName );
      return null;
    }
   
    LOG.fine( "fetching from cache " + cacheName );
    return info.getProperties();
  }
View Full Code Here

TOP

Related Classes of dev.db.biz.configuration.property.PropertyCacheInfo

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.