Package net.time4j.tz
Class Timezone.Cache
java.lang.Object
net.time4j.tz.Timezone.Cache
- Enclosing class:
- Timezone
Offers some static methods for the configuration of the timezone cache.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
refresh()
Can refresh the timezone cache in case of a dynamic update of the underlying timezone repository.static void
setCacheActive(boolean active)
Aktivates or deactivates the internal cache.static void
setMinimumCacheSize(int minimumCacheSize)
Updates the size of the internal timezone cache.
-
Method Details
-
refresh
public static void refresh()Can refresh the timezone cache in case of a dynamic update of the underlying timezone repository.
First the internal cache will be cleared. Furthermore, if needed the system timezone will be determined again.
-
setCacheActive
public static void setCacheActive(boolean active)Aktivates or deactivates the internal cache.
The timezone cache is active by default. Switching off the cache can make the performance worse especially if the underlying
ZoneModelProvider
itself has no cache.- Parameters:
active
-true
if cache shall be active elsefalse
-
setMinimumCacheSize
public static void setMinimumCacheSize(int minimumCacheSize)Updates the size of the internal timezone cache.
- Parameters:
minimumCacheSize
- new minimum size of cache- Throws:
IllegalArgumentException
- if the argument is negative
-