Package net.time4j.tz

Class Timezone.Cache

java.lang.Object
net.time4j.tz.Timezone.Cache
Enclosing class:
Timezone

public static class Timezone.Cache extends Object

Offers some static methods for the configuration of the timezone cache.

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 else false
    • 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