Class ClearableDocumentLayerCache

  • All Implemented Interfaces:
    com.levigo.jadice.document.DocumentLayerCache

    public class ClearableDocumentLayerCache
    extends Object
    implements com.levigo.jadice.document.DocumentLayerCache
    A DocumentLayerCache which can be cleared so that no DocumentLayers will be cached forever. This helps to avoid memory leaks.
    • Constructor Detail

      • ClearableDocumentLayerCache

        public ClearableDocumentLayerCache()
    • Method Detail

      • getDocumentLayer

        public com.levigo.jadice.document.DocumentLayer getDocumentLayer​(String name,
                                                                         int priority)
        Specified by:
        getDocumentLayer in interface com.levigo.jadice.document.DocumentLayerCache
      • putDocumentLayer

        public void putDocumentLayer​(com.levigo.jadice.document.DocumentLayer layer)
        Specified by:
        putDocumentLayer in interface com.levigo.jadice.document.DocumentLayerCache
      • clear

        public void clear()
      • getSize

        public int getSize()
        Returns:
        Number of non-default DocumentLayers currently cached