Class CacheableElement

java.lang.Object
io.john.amiscaray.stir.domain.elements.CacheableElement
Direct Known Subclasses:
AbstractUIElement

public abstract class CacheableElement
extends Object
The base class for element cache operations
  • Field Details

    • propertyChangeSupport

      protected final PropertyChangeSupport propertyChangeSupport
      Used to listen for object property change events to appropriately update the cache
    • cacheStatus

      protected CacheableElement.CacheStatus cacheStatus
      Used to keep track of the cache freshness. See the CacheStatus enum
    • cacheContents

      private String cacheContents
      The cache contents for the element
    • hasChildren

      private boolean hasChildren
      Whether the element has children elements (used for caching purposes)
    • cacheDisabled

      protected boolean cacheDisabled
      Whether to disable caching on the element
  • Constructor Details

    • CacheableElement

      public CacheableElement()
  • Method Details

    • getCacheStatus

      public CacheableElement.CacheStatus getCacheStatus()
    • getCacheContents

      public String getCacheContents()
    • isHasChildren

      public boolean isHasChildren()
    • isCacheDisabled

      public boolean isCacheDisabled()
    • setHasChildren

      public void setHasChildren​(boolean hasChildren)
    • setCacheDisabled

      public void setCacheDisabled​(boolean cacheDisabled)
    • setCacheContents

      public void setCacheContents​(String cacheContents)
    • emptyCache

      public void emptyCache()
    • addPropertyChangeListener

      public void addPropertyChangeListener​(PropertyChangeListener listener)
      Adds an event listener for any changes to the object
      Parameters:
      listener - A PropertyChangeListener for when an object property changes