Class ReloadableResourceBundleMessageSource.PropertiesHolder
- java.lang.Object
- org.springframework.context.support.ReloadableResourceBundleMessageSource.PropertiesHolder
- Enclosing class:
- ReloadableResourceBundleMessageSource
protected class ReloadableResourceBundleMessageSource.PropertiesHolder extends Object
PropertiesHolder for caching. Stores the last-modified timestamp of the source file for efficient change detection, and the timestamp of the last refresh attempt (updated every time the cache entry gets re-validated).
Constructor Summary
Constructors Constructor Description PropertiesHolder()PropertiesHolder(Properties properties, long fileTimestamp)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetFileTimestamp()MessageFormatgetMessageFormat(String code, Locale locale)PropertiesgetProperties()StringgetProperty(String code)longgetRefreshTimestamp()voidsetRefreshTimestamp(long refreshTimestamp)
Constructor Detail
PropertiesHolder
public PropertiesHolder()
PropertiesHolder
public PropertiesHolder(Properties properties, long fileTimestamp)
Method Detail
getProperties
@Nullable public Properties getProperties()
getFileTimestamp
public long getFileTimestamp()
setRefreshTimestamp
public void setRefreshTimestamp(long refreshTimestamp)
getRefreshTimestamp
public long getRefreshTimestamp()
getProperty
@Nullable public String getProperty(String code)
getMessageFormat
@Nullable public MessageFormat getMessageFormat(String code, Locale locale)