class ConstantMap
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
ConstantMap.Key
Same as java.lang.Long, but
value can be modified so a lookup instance can be reused
and object creation avoided |
private class |
ConstantMap.Reference |
| Modifier and Type | Field and Description |
|---|---|
private boolean |
allConstantsLoaded |
private IPoolFactory<?> |
factory |
private DataType |
keyType |
private ConstantMap.Key |
lookupKey |
private java.util.Map<ConstantMap.Key,ConstantEntryList> |
map |
private IValueReader |
valueReader |
| Constructor and Description |
|---|
ConstantMap() |
| Modifier and Type | Method and Description |
|---|---|
(package private) java.lang.Object |
get(long valueId,
long atTimestamp)
Returns one of the values identified by
valueId. |
(package private) ContentType<?> |
getContentType() |
private ConstantEntryList |
getEntryList(long valueId) |
(package private) void |
init(IValueReader valueReader,
DataType keyType,
IPoolFactory<?> factory) |
private void |
put(long valueId,
java.lang.Object value,
long timestamp) |
(package private) void |
readValue(byte[] data,
Offset offset,
long timestamp) |
(package private) static java.lang.Object |
resolve(java.lang.Object o,
long atTimestamp) |
(package private) void |
setLoadDone() |
(package private) void |
touchAll() |
private final java.util.Map<ConstantMap.Key,ConstantEntryList> map
private boolean allConstantsLoaded
private IPoolFactory<?> factory
private final ConstantMap.Key lookupKey
private IValueReader valueReader
private DataType keyType
void init(IValueReader valueReader, DataType keyType, IPoolFactory<?> factory)
void setLoadDone()
throws InvalidJfrFileException
InvalidJfrFileExceptionvoid touchAll()
void readValue(byte[] data,
Offset offset,
long timestamp)
throws InvalidJfrFileException
InvalidJfrFileExceptionprivate void put(long valueId,
java.lang.Object value,
long timestamp)
ContentType<?> getContentType()
java.lang.Object get(long valueId,
long atTimestamp)
valueId. The value returned is the value
associated with the smallest timestamp larger than or equals to atTimestamp. If the
map doesn't contain a value identified by valueId, a dummy object may be returned.private ConstantEntryList getEntryList(long valueId)
static java.lang.Object resolve(java.lang.Object o,
long atTimestamp)