Interface PluginDocument.SizeRequiredToLoadIntoMemoryProvider

  • All Known Implementing Classes:
    DefaultAlignmentDocument, DefaultPhylogenyDocument, DefaultSequenceListDocument, PhylogenyDocument
    Enclosing interface:
    PluginDocument

    public static interface PluginDocument.SizeRequiredToLoadIntoMemoryProvider
    A PluginDocument may implement this interface to indicate to Geneious the amount of memory it will probably require in order to load the document. A PluginDocument that does not implement this interface is assumed to require a size similar to its usage on disk. Only documents that do not load their entire contents into memory at once need implement this interface. Geneious uses this information to show a dialog about the user having insufficient free memory prior to trying to load the document.
    Since:
    API 4.40 (Geneious 5.4.0)
    • Method Detail

      • getSizeRequiredToLoadIntoMemory

        long getSizeRequiredToLoadIntoMemory()
        Return an estimate of the number of bytes required to load this document into memory. Or 0 if this document is unable to make an estimate in which case Geneious will use AnnotatedPluginDocument.getSize(). Geneious caches the value returned from this method when the document is wrapped in an AnnotatedPluginDocument or when it is saved.
        Returns:
        an estimate of the number of bytes required to load this document into memory. Or 0 if this document is unable to make an estimate.