private boolean isConfigChanged ( boolean init ) throws IOException { if ( init && ( configFileName == null || ( poolsConfigFileName == null && conf . onlyAllowConfiguredPools ( ) ) ) ) { throw new IOException ( "ClusterManager needs a config and a " + "pools file to start" ) ; } if ( configFileName == null && poolsConfigFileName == null ) { return false ; } boolean configChanged = false ; if ( configFileName != null ) { File file = new File ( configFileName ) ; configChanged |= ( file . lastModified ( ) == 0 || file . lastModified ( ) > lastSuccessfulReload ) ; } if ( poolsConfigFileName != null ) { File file = new File ( poolsConfigFileName ) ; configChanged |= ( file . lastModified ( ) == 0 || file . lastModified ( ) > lastSuccessfulReload ) ; } return configChanged ; }
Check if the config files have changed since they were last read