Class FieldMemoryStats

    • Constructor Detail

      • FieldMemoryStats

        public FieldMemoryStats​(ObjectLongHashMap<String> stats)
        Creates a new FieldMemoryStats instance
    • Method Detail

      • add

        public void add​(FieldMemoryStats fieldMemoryStats)
        Adds / merges the given field memory stats into this stats instance
      • toXContent

        public void toXContent​(XContentBuilder builder,
                               String key,
                               String rawKey,
                               String readableKey)
                        throws IOException
        Generates x-content into the given builder for each of the fields in this stats instance
        Parameters:
        builder - the builder to generated on
        key - the top level key for this stats object
        rawKey - the raw byte key for each of the fields byte sizes
        readableKey - the readable key for each of the fields byte sizes
        Throws:
        IOException
      • copy

        public FieldMemoryStats copy()
        Creates a deep copy of this stats instance
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • get

        public long get​(String field)
        Returns the fields value in bytes or 0 if it's not present in the stats
      • containsField

        public boolean containsField​(String field)
        Returns true iff the given field is in the stats