Class VMADetailedStatistics
java.lang.Object
com.io7m.jcoronado.vma.VMADetailedStatistics
- All Implemented Interfaces:
VMADetailedStatisticsType
Detailed statistics for a set of VMA allocations, corresponding to a single
memory type, a single memory heap, or the aggregate total.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeVMADetailedStatistics. -
Method Summary
Modifier and TypeMethodDescriptionlongintlonglonglongintbuilder()Creates a builder forVMADetailedStatistics.static VMADetailedStatisticscopyOf(VMADetailedStatisticsType instance) Creates an immutable copy of aVMADetailedStatisticsTypevalue.booleanThis instance is equal to all instances ofVMADetailedStatisticsthat have equal attribute values.inthashCode()Computes a hash code from attributes:blockCount,allocationCount,blockBytes,allocationBytes,unusedRangeCount,allocationSizeMin,allocationSizeMax,unusedRangeSizeMin,unusedRangeSizeMax.toString()Prints the immutable valueVMADetailedStatisticswith attribute values.intlonglongfinal VMADetailedStatisticswithAllocationBytes(long value) Copy the current immutable object by setting a value for theallocationBytesattribute.final VMADetailedStatisticswithAllocationCount(int value) Copy the current immutable object by setting a value for theallocationCountattribute.final VMADetailedStatisticswithAllocationSizeMax(long value) Copy the current immutable object by setting a value for theallocationSizeMaxattribute.final VMADetailedStatisticswithAllocationSizeMin(long value) Copy the current immutable object by setting a value for theallocationSizeMinattribute.final VMADetailedStatisticswithBlockBytes(long value) Copy the current immutable object by setting a value for theblockBytesattribute.final VMADetailedStatisticswithBlockCount(int value) Copy the current immutable object by setting a value for theblockCountattribute.final VMADetailedStatisticswithUnusedRangeCount(int value) Copy the current immutable object by setting a value for theunusedRangeCountattribute.final VMADetailedStatisticswithUnusedRangeSizeMax(long value) Copy the current immutable object by setting a value for theunusedRangeSizeMaxattribute.final VMADetailedStatisticswithUnusedRangeSizeMin(long value) Copy the current immutable object by setting a value for theunusedRangeSizeMinattribute.
-
Method Details
-
blockCount
public int blockCount()- Specified by:
blockCountin interfaceVMADetailedStatisticsType- Returns:
- The total number of allocated memory blocks.
-
allocationCount
public int allocationCount()- Specified by:
allocationCountin interfaceVMADetailedStatisticsType- Returns:
- The total number of allocations.
-
blockBytes
public long blockBytes()- Specified by:
blockBytesin interfaceVMADetailedStatisticsType- Returns:
- The total size in bytes of all allocated memory blocks.
-
allocationBytes
public long allocationBytes()- Specified by:
allocationBytesin interfaceVMADetailedStatisticsType- Returns:
- The total size in bytes of all allocations.
-
unusedRangeCount
public int unusedRangeCount()- Specified by:
unusedRangeCountin interfaceVMADetailedStatisticsType- Returns:
- The number of unused (free) ranges within the memory blocks.
-
allocationSizeMin
public long allocationSizeMin()- Specified by:
allocationSizeMinin interfaceVMADetailedStatisticsType- Returns:
- The minimum allocation size, in bytes.
-
allocationSizeMax
public long allocationSizeMax()- Specified by:
allocationSizeMaxin interfaceVMADetailedStatisticsType- Returns:
- The maximum allocation size, in bytes.
-
unusedRangeSizeMin
public long unusedRangeSizeMin()- Specified by:
unusedRangeSizeMinin interfaceVMADetailedStatisticsType- Returns:
- The minimum unused range size, in bytes.
-
unusedRangeSizeMax
public long unusedRangeSizeMax()- Specified by:
unusedRangeSizeMaxin interfaceVMADetailedStatisticsType- Returns:
- The maximum unused range size, in bytes.
-
withBlockCount
Copy the current immutable object by setting a value for theblockCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for blockCount- Returns:
- A modified copy or the
thisobject
-
withAllocationCount
Copy the current immutable object by setting a value for theallocationCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for allocationCount- Returns:
- A modified copy or the
thisobject
-
withBlockBytes
Copy the current immutable object by setting a value for theblockBytesattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for blockBytes- Returns:
- A modified copy or the
thisobject
-
withAllocationBytes
Copy the current immutable object by setting a value for theallocationBytesattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for allocationBytes- Returns:
- A modified copy or the
thisobject
-
withUnusedRangeCount
Copy the current immutable object by setting a value for theunusedRangeCountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for unusedRangeCount- Returns:
- A modified copy or the
thisobject
-
withAllocationSizeMin
Copy the current immutable object by setting a value for theallocationSizeMinattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for allocationSizeMin- Returns:
- A modified copy or the
thisobject
-
withAllocationSizeMax
Copy the current immutable object by setting a value for theallocationSizeMaxattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for allocationSizeMax- Returns:
- A modified copy or the
thisobject
-
withUnusedRangeSizeMin
Copy the current immutable object by setting a value for theunusedRangeSizeMinattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for unusedRangeSizeMin- Returns:
- A modified copy or the
thisobject
-
withUnusedRangeSizeMax
Copy the current immutable object by setting a value for theunusedRangeSizeMaxattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for unusedRangeSizeMax- Returns:
- A modified copy or the
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aVMADetailedStatisticsTypevalue. 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 VMADetailedStatistics instance
-
builder
Creates a builder forVMADetailedStatistics.VMADetailedStatistics.builder() .setBlockCount(int) // required
blockCount.setAllocationCount(int) // requiredallocationCount.setBlockBytes(long) // requiredblockBytes.setAllocationBytes(long) // requiredallocationBytes.setUnusedRangeCount(int) // requiredunusedRangeCount.setAllocationSizeMin(long) // requiredallocationSizeMin.setAllocationSizeMax(long) // requiredallocationSizeMax.setUnusedRangeSizeMin(long) // requiredunusedRangeSizeMin.setUnusedRangeSizeMax(long) // requiredunusedRangeSizeMax.build();- Returns:
- A new VMADetailedStatistics builder
-