Class VMATotalStatistics
java.lang.Object
com.io7m.jcoronado.vma.VMATotalStatistics
- All Implemented Interfaces:
VMATotalStatisticsType
The full statistics reported by a VMA allocator: the aggregate total, plus a
per-memory-heap and per-memory-type breakdown.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic VMATotalStatistics.Builderbuilder()Creates a builder forVMATotalStatistics.static VMATotalStatisticscopyOf(VMATotalStatisticsType instance) Creates an immutable copy of aVMATotalStatisticsTypevalue.booleanThis instance is equal to all instances ofVMATotalStatisticsthat have equal attribute values.inthashCode()Computes a hash code from attributes:total,heaps,memoryTypes.heaps()toString()Prints the immutable valueVMATotalStatisticswith attribute values.total()final VMATotalStatisticswithHeaps(VMADetailedStatistics... elements) Copy the current immutable object with elements that replace the content ofheaps.final VMATotalStatisticswithHeaps(Iterable<? extends VMADetailedStatistics> elements) Copy the current immutable object with elements that replace the content ofheaps.final VMATotalStatisticswithMemoryTypes(VMADetailedStatistics... elements) Copy the current immutable object with elements that replace the content ofmemoryTypes.final VMATotalStatisticswithMemoryTypes(Iterable<? extends VMADetailedStatistics> elements) Copy the current immutable object with elements that replace the content ofmemoryTypes.final VMATotalStatisticswithTotal(VMADetailedStatistics value) Copy the current immutable object by setting a value for thetotalattribute.
-
Method Details
-
total
- Specified by:
totalin interfaceVMATotalStatisticsType- Returns:
- The aggregate statistics across all memory types and heaps.
-
heaps
- Specified by:
heapsin interfaceVMATotalStatisticsType- Returns:
- Per-memory-heap statistics, indexed by heap index.
-
memoryTypes
- Specified by:
memoryTypesin interfaceVMATotalStatisticsType- Returns:
- Per-memory-type statistics, indexed by memory type index.
-
withTotal
Copy the current immutable object by setting a value for thetotalattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for total- Returns:
- A modified copy or the
thisobject
-
withHeaps
Copy the current immutable object with elements that replace the content ofheaps.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withHeaps
Copy the current immutable object with elements that replace the content ofheaps. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of heaps elements to set- Returns:
- A modified copy or
thisif not changed
-
withMemoryTypes
Copy the current immutable object with elements that replace the content ofmemoryTypes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMemoryTypes
Copy the current immutable object with elements that replace the content ofmemoryTypes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of memoryTypes elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVMATotalStatisticsTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable VMATotalStatistics instance
-
builder
Creates a builder forVMATotalStatistics.VMATotalStatistics.builder() .setTotal(com.io7m.jcoronado.vma.VMADetailedStatistics) // required
total.addHeaps|addAllHeaps(VMADetailedStatistics) //heapselements .addMemoryTypes|addAllMemoryTypes(VMADetailedStatistics) //memoryTypeselements .build();- Returns:
- A new VMATotalStatistics builder
-