public class StatRes extends Object implements Described, HasBasicSizeinfo
| Constructor and Description |
|---|
StatRes(String description,
long time)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Object o)
Add statistics representation.
|
String |
getDescription()
Human readable description of the instance.
|
String |
getJson()
Return JSON content.
|
long |
getSize()
Size of the represented resource.
|
SizeInfoDto |
getSizeInfo(Function<Object,Long> sizeof)
Invoke size calculation.
|
long |
getTime()
Init/load/prepare time of the represented resource.
|
public StatRes(String description, long time)
description - Human readable descriptiontime - Associated init/create/load timepublic SizeInfoDto getSizeInfo(Function<Object,Long> sizeof)
HasBasicSizeinfogetSizeInfo in interface HasBasicSizeinfosizeof - Function for deep size calculation, expected to handle NoSize annotations.public String getDescription()
DescribedgetDescription in interface Describedpublic void add(Object o)
o - Statistics instancepublic String getJson()
public long getSize()
DescribedgetSize in interface DescribedResourceInfo.sizeDescription()