org.apache.commons.configuration.reloading
Class FileRandomReloadingStrategy

java.lang.Object
  extended by org.apache.commons.configuration.reloading.FileChangedReloadingStrategy
      extended by org.apache.commons.configuration.reloading.FileRandomReloadingStrategy
All Implemented Interfaces:
ReloadingStrategy

public class FileRandomReloadingStrategy
extends FileChangedReloadingStrategy

A ReloadingStrategy that randomly returns true or false;


Field Summary
 
Fields inherited from class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy
configuration, lastChecked, lastModified, refreshDelay
 
Constructor Summary
FileRandomReloadingStrategy()
           
 
Method Summary
 File getMonitoredFile()
          Returns the file that is watched by this strategy.
 boolean reloadingRequired()
          Checks whether a reload is necessary.
 
Methods inherited from class org.apache.commons.configuration.reloading.FileChangedReloadingStrategy
getFile, getRefreshDelay, hasChanged, init, reloadingPerformed, setConfiguration, setRefreshDelay, updateLastModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileRandomReloadingStrategy

public FileRandomReloadingStrategy()
Method Detail

reloadingRequired

public boolean reloadingRequired()
Checks whether a reload is necessary.

Specified by:
reloadingRequired in interface ReloadingStrategy
Overrides:
reloadingRequired in class FileChangedReloadingStrategy
Returns:
a flag whether a reload is required

getMonitoredFile

public File getMonitoredFile()
Returns the file that is watched by this strategy.

Returns:
the monitored file


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.