Package net.n2oapp.properties
Class ReloadableProperties
java.lang.Object
java.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
net.n2oapp.properties.OverrideProperties
net.n2oapp.properties.ReloadableProperties
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
- Direct Known Subclasses:
ServletPathProperties
ReloadableProperties reads values from .properties file every
cacheTime seconds
User: operhod
Date: 10.10.13
Time: 17:05- See Also:
-
Field Summary
Fields inherited from class java.util.Properties
defaults -
Constructor Summary
ConstructorsConstructorDescriptionReloadableProperties(URI uri) ReloadableProperties(org.springframework.core.io.Resource resource) -
Method Summary
Modifier and TypeMethodDescriptionintorg.springframework.core.io.ResourcebooleanisExists()booleankeys()voidload(InputStream inStream) voidvoidEnumeration<?>voidremoveProperty(Object key) voidsetCacheTime(int cacheTime) voidsetResource(org.springframework.core.io.Resource resource) superGetProperty(String key) получить property текущего уровня, без учета наследованияvoidupdateProperty(Object key, Object value) Methods inherited from class net.n2oapp.properties.OverrideProperties
contains, containsKey, containsValue, getBaseProperties, getProperty, setBaseProperties, sizeMethods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, elements, entrySet, equals, forEach, getOrDefault, getProperty, hashCode, isEmpty, keySet, list, list, merge, putAll, putIfAbsent, rehash, remove, replace, replace, replaceAll, save, setProperty, store, store, storeToXML, storeToXML, storeToXML, toString, values
-
Constructor Details
-
ReloadableProperties
- Throws:
MalformedURLException
-
ReloadableProperties
public ReloadableProperties(org.springframework.core.io.Resource resource) -
ReloadableProperties
public ReloadableProperties()
-
-
Method Details
-
stringPropertyNames
- Overrides:
stringPropertyNamesin classOverrideProperties
-
propertyNames
- Overrides:
propertyNamesin classProperties
-
keys
- Overrides:
keysin classOverrideProperties
-
superGetProperty
Description copied from class:OverridePropertiesполучить property текущего уровня, без учета наследования- Overrides:
superGetPropertyin classOverrideProperties
-
get
-
put
-
remove
-
getCurrentLvlProperty
- Overrides:
getCurrentLvlPropertyin classOverrideProperties
-
updateProperty
-
removeProperty
-
isExists
public boolean isExists() -
isExpired
public boolean isExpired() -
load
- Overrides:
loadin classProperties- Throws:
IOException
-
load
- Overrides:
loadin classProperties- Throws:
IOException
-
loadFromXML
- Overrides:
loadFromXMLin classProperties- Throws:
IOException
-
getCacheTime
public int getCacheTime() -
setCacheTime
public void setCacheTime(int cacheTime) -
getResource
public org.springframework.core.io.Resource getResource() -
setResource
public void setResource(org.springframework.core.io.Resource resource)
-