public class MessageProviderCacheCleanupExecutor extends Object
CompositeMessageSource.clearMessageProviderCaches() on
a regular interval if enabled (by default it is disabled). This feature is intended to be used during development,
together with a tool such as JRebel, to prevent time consuming application restarts while tweaking the translations.
To enable, specify the interval in seconds in the environment property
"vaadin4spring.i18n.message-provider-cache.cleanup-interval-seconds"
and disable the message format cache of the CompositeMessageSource.
CompositeMessageSource.setMessageFormatCacheEnabled(boolean)| Modifier and Type | Field and Description |
|---|---|
static String |
ENV_PROP_MESSAGE_PROVIDER_CACHE_CLEANUP_INTERVAL_SECONDS
An environment property specifying the interval of the cache cleanups.
|
| Constructor and Description |
|---|
MessageProviderCacheCleanupExecutor(Environment environment,
CompositeMessageSource compositeMessageSource)
Creates a new
MessageProviderCacheCleanupExecutor and starts up the cleanup thread if cache cleanup
has been enabled. |
public static final String ENV_PROP_MESSAGE_PROVIDER_CACHE_CLEANUP_INTERVAL_SECONDS
public MessageProviderCacheCleanupExecutor(Environment environment, CompositeMessageSource compositeMessageSource)
MessageProviderCacheCleanupExecutor and starts up the cleanup thread if cache cleanup
has been enabled.@PreDestroy public void destroy()
Copyright © 2017. All rights reserved.