Interface ICollectionExtractor

    • Method Detail

      • getSize

        java.lang.Integer getSize​(IObject collection)
                           throws SnapshotException
        Extract the size of the collection.
        Parameters:
        collection - - the collection to find the size of
        Returns:
        the size, or null if not available
        Throws:
        SnapshotException - if there is a problem retrieving data from the snapshot
        See Also:
        hasSize()
      • getCapacity

        java.lang.Integer getCapacity​(IObject collection)
                               throws SnapshotException
        Return the capacity of the collection, if applicable
        Parameters:
        collection - - the collection to find the capacity of
        Returns:
        the capacity in bytes, or null if unavailable
        Throws:
        SnapshotException - if there is a problem retrieving data from the snapshot
        See Also:
        hasCapacity()
      • hasFillRatio

        boolean hasFillRatio()
        Check if fill ratio for the collection can be calculated, i.e. if it has some predefined capacity and actual size.
        Returns:
        true if getFillRatio(IObject) could be called
        See Also:
        getFillRatio(IObject)
      • getFillRatio

        java.lang.Double getFillRatio​(IObject collection)
                               throws SnapshotException
        Calculate the fill ratio of a collection
        Parameters:
        collection - - the collection to find the fill ratio of
        Returns:
        the fill ratio, between 0.0 and 1.0, or null if unavailable
        Throws:
        SnapshotException - if there is a problem retrieving data from the snapshot
        See Also:
        hasFillRatio()
      • extractEntryIds

        int[] extractEntryIds​(IObject collection)
                       throws SnapshotException
        Returns the object ids (int) for all objects which are contained in the collection
        Parameters:
        collection - - the collection to find the objects it holds
        Returns:
        an array of ints which are the object ids.
        Throws:
        SnapshotException - if there is a problem retrieving data from the snapshot
        See Also:
        hasExtractableContents()
      • hasExtractableArray

        boolean hasExtractableArray()
        Return true if the collection array based and the array can be extracted from the heap dump
        Returns:
        true if extractEntries(IObject) could be called
        See Also:
        extractEntries(IObject)
      • extractEntries

        IObjectArray extractEntries​(IObject collection)
                             throws SnapshotException
        Extracts the array containing the collection content
        Parameters:
        collection - - the collection to find the object array holding its contents
        Returns:
        the backing array for the collection
        Throws:
        SnapshotException - if there is a problem retrieving data from the snapshot
        See Also:
        hasExtractableArray()
      • getNumberOfNotNullElements

        java.lang.Integer getNumberOfNotNullElements​(IObject collection)
                                              throws SnapshotException
        Returns the number of non-null elements in the collection. Requires hasExtractableContents or hasExtractableArray
        Parameters:
        collection - - the collection to find the number of non-null content objects
        Returns:
        the number of non-null elements, or null if not available
        Throws:
        SnapshotException
        See Also:
        hasExtractableContents(), hasExtractableArray()