Configuration-based cache that can cache reflection information and other things
| Modifier and Type | Class and Description |
|---|---|
| private static record | Cache.Key2
A 2-value key for caching. |
| private static record | Cache.Key3
A 3-value key for caching. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Object | NULL
A |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static final Object | |
| pack-priv static final Object | |
| pack-priv static final <V> V | Returns: The cached value or the outcome of the cached operation.The configuration that may cache the outcome of
the cached operation. configuration, Supplier<V> The expensive operation. operation, CacheType The cache type to be used. type, Supplier<?> The cache keys. key)Run a cached operation in the context of a |
| NULL | back to summary |
|---|---|
| private static final Object NULL A | |
| Cache | back to summary |
|---|---|
| pack-priv Cache() | |
| key | back to summary |
|---|---|
| pack-priv static final Object key(Object key1, Object key2) Create a single-value or multi-value key for caching. | |
| key | back to summary |
|---|---|
| pack-priv static final Object key(Object key1, Object key2, Object key3) Create a single-value or multi-value key for caching. | |
| run | back to summary |
|---|---|
| pack-priv static final <V> V run(Configuration configuration, Supplier<V> operation, CacheType type, Supplier<?> key) Run a cached operation in the context of a
| |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object
the reference object with which to compare. o)Implements abstract java. |
| public final int | |
| public Object | |
| public Object | |
| public final String | toString()
Implements abstract java. |
| key1 | back to summary |
|---|---|
| private final Object key1 Record Component accessed by key1(). | |
| key2 | back to summary |
|---|---|
| private final Object key2 Record Component accessed by key2(). | |
| Key2 | back to summary |
|---|---|
| private Key2(Object key1, Object key2) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| key1 | back to summary |
|---|---|
| public Object key1() Record Component getter of key1. | |
| key2 | back to summary |
|---|---|
| public Object key2() Record Component getter of key2. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private final Object | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object
the reference object with which to compare. o)Implements abstract java. |
| public final int | |
| public Object | |
| public Object | |
| public Object | |
| public final String | toString()
Implements abstract java. |
| key1 | back to summary |
|---|---|
| private final Object key1 Record Component accessed by key1(). | |
| key2 | back to summary |
|---|---|
| private final Object key2 Record Component accessed by key2(). | |
| key3 | back to summary |
|---|---|
| private final Object key3 Record Component accessed by key3(). | |
| Key3 | back to summary |
|---|---|
| private Key3(Object key1, Object key2, Object key3) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of
| |
| key1 | back to summary |
|---|---|
| public Object key1() Record Component getter of key1. | |
| key2 | back to summary |
|---|---|
| public Object key2() Record Component getter of key2. | |
| key3 | back to summary |
|---|---|
| public Object key3() Record Component getter of key3. | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.
| |