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)
HasBasicSizeinfo
getSizeInfo
in interface HasBasicSizeinfo
sizeof
- Function for deep size calculation, expected to handle NoSize
annotations.public String getDescription()
Described
getDescription
in interface Described
public void add(Object o)
o
- Statistics instancepublic String getJson()
public long getSize()
Described
getSize
in interface Described
ResourceInfo.sizeDescription()