Interface ICollectionExtractor

All Known Subinterfaces:
IMapExtractor
All Known Implementing Classes:
ArrayCollectionExtractor, ArrayListSubListCollectionExtractor, ConcurrentHashMapCollectionExtractor, ConcurrentSkipListCollectionExtractor, ConcurrentSkipListSetCollectionExtractor, EmptyCollectionExtractor, EmptyMapExtractor, FieldArrayCollectionExtractor, FieldSizeArrayCollectionExtractor, FieldSizeArrayMapExtractor, FieldSizedCapacityCollectionExtractor, FieldSizedCapacityMapExtractor, FieldSizedCollectionExtractor, HashedMapCollectionExtractorBase, HashMapCollectionExtractor, HashSetCollectionExtractor, IBM6ArrayListCollectionExtractor, IdentityHashMapCollectionExtractor, KeySetCollectionExtractor, LinkedListCollectionExtractor, MapCollectionExtractorBase, MATArrayBig, MATCollectionExtractor, NoContentCollectionExtractor, Pair12CollectionExtractor, PairCollectionExtractor, RegularEnumSetExtractor, ReplicatedValueCollectionExtractor, SetFromCollectionExtractor, SingletonCollectionExtractor, SingletonMapExtractor, TreeMapArrayCollectionExtractor, TreeMapCollectionExtractor, TreeSetArrayCollectionExtractor, TreeSetCollectionExtractor, ValuesCollectionExtractor, WrapperCollectionExtractor, WrapperFieldCollectionExtractor, WrapperFieldMapExtractor, WrapperMapExtractor, WrapperSetFromMapExtractor

public interface ICollectionExtractor
CollectionExtractors are used to extract from the heap dump the contents of an object which represents a collection of a certain type. It knows the internal details of how the collection contents are stored and if the collection has certain properties or not
Since:
1.5
  • Method Details

    • hasSize

      boolean hasSize()
      Check if the size of the collection can be extracted.
      Returns:
      true if getSize(IObject) could be called
      See Also:
    • getSize

      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:
    • hasCapacity

      boolean hasCapacity()
      Check if the collection has capacity, e.g. ArrayList
      Returns:
      true if getCapacity(IObject) could be called
      See Also:
    • getCapacity

      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:
    • 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

      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:
    • hasExtractableContents

      boolean hasExtractableContents()
      Check if the collection has extractable contents
      Returns:
      true if extractEntryIds(IObject) could be called
      See Also:
    • 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:
    • 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

      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:
    • getNumberOfNotNullElements

      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: