| 程序包 | 说明 |
|---|---|
| org.springframework.cache | |
| org.springframework.cache.caffeine | |
| org.springframework.cache.support | |
| org.springframework.util |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
Cache.ValueWrapper.get()
Return the actual value in the cache.
|
Cache.ValueWrapper |
Cache.get(Object key)
Return the value to which this cache maps the specified key.
|
<T> T |
Cache.get(Object key,
Callable<T> valueLoader)
Return the value to which this cache maps the specified key, obtaining
that value from
valueLoader if necessary. |
<T> T |
Cache.get(Object key,
Class<T> type)
Return the value to which this cache maps the specified key,
generically specifying a type that return value will be cast to.
|
Cache |
CacheManager.getCache(String name)
Get the cache associated with the given name.
|
Object |
Cache.ValueRetrievalException.getKey() |
default Cache.ValueWrapper |
Cache.putIfAbsent(Object key,
Object value)
Atomically associate the specified value with the specified key in this cache
if it is not set already.
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
Cache.get(Object key,
Class<T> type)
Return the value to which this cache maps the specified key,
generically specifying a type that return value will be cast to.
|
void |
Cache.put(Object key,
Object value)
Associate the specified value with the specified key in this cache.
|
default Cache.ValueWrapper |
Cache.putIfAbsent(Object key,
Object value)
Atomically associate the specified value with the specified key in this cache
if it is not set already.
|
| 构造器和说明 |
|---|
ValueRetrievalException(Object key,
Callable<?> loader,
Throwable ex) |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> T |
CaffeineCache.get(Object key,
Callable<T> valueLoader) |
Cache |
CaffeineCacheManager.getCache(String name) |
protected Object |
CaffeineCache.lookup(Object key) |
Cache.ValueWrapper |
CaffeineCache.putIfAbsent(Object key,
Object value) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
CaffeineCache.put(Object key,
Object value) |
Cache.ValueWrapper |
CaffeineCache.putIfAbsent(Object key,
Object value) |
void |
CaffeineCacheManager.setCacheNames(Collection<String> cacheNames)
Specify the set of cache names for this CacheManager's 'static' mode.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected Object |
AbstractValueAdaptingCache.fromStoreValue(Object storeValue)
Convert the given value from the internal store to a user value
returned from the get method (adapting
null). |
Object |
SimpleValueWrapper.get()
Simply returns the value as given at construction time.
|
Cache.ValueWrapper |
AbstractValueAdaptingCache.get(Object key) |
<T> T |
AbstractValueAdaptingCache.get(Object key,
Class<T> type) |
protected abstract Object |
AbstractValueAdaptingCache.lookup(Object key)
Perform an actual lookup in the underlying store.
|
protected Cache.ValueWrapper |
AbstractValueAdaptingCache.toValueWrapper(Object storeValue)
Wrap the given store value with a
SimpleValueWrapper, also going
through AbstractValueAdaptingCache.fromStoreValue(java.lang.Object) conversion. |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
NullValue.equals(Object obj) |
protected Object |
AbstractValueAdaptingCache.fromStoreValue(Object storeValue)
Convert the given value from the internal store to a user value
returned from the get method (adapting
null). |
<T> T |
AbstractValueAdaptingCache.get(Object key,
Class<T> type) |
protected Object |
AbstractValueAdaptingCache.toStoreValue(Object userValue)
Convert the given user value, as passed into the put method,
to a value in the internal store (adapting
null). |
protected Cache.ValueWrapper |
AbstractValueAdaptingCache.toValueWrapper(Object storeValue)
Wrap the given store value with a
SimpleValueWrapper, also going
through AbstractValueAdaptingCache.fromStoreValue(java.lang.Object) conversion. |
| 构造器和说明 |
|---|
SimpleValueWrapper(Object value)
Create a new SimpleValueWrapper instance for exposing the given value.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static Object |
ObjectUtils.unwrapOptional(Object obj)
Unwrap the given object which is potentially a
Optional. |
| 限定符和类型 | 方法和说明 |
|---|---|
static <A,O extends A> |
ObjectUtils.addObjectToArray(A[] array,
O obj)
Append the given object to the given array, returning a new array
consisting of the input array contents plus the given object.
|
static <A,O extends A> |
ObjectUtils.addObjectToArray(A[] array,
O obj)
Append the given object to the given array, returning a new array
consisting of the input array contents plus the given object.
|
static boolean |
ObjectUtils.containsElement(Object[] array,
Object element)
Check whether the given array contains the given element.
|
static String |
ObjectUtils.getDisplayString(Object obj)
Return a content-based String representation if
obj is
not null; otherwise returns an empty String. |
static String |
ObjectUtils.identityToString(Object obj)
Return a String representation of an object's overall identity.
|
static boolean |
ObjectUtils.isArray(Object obj)
Determine whether the given object is an array:
either an Object array or a primitive array.
|
static boolean |
ObjectUtils.isCompatibleWithThrowsClause(Throwable ex,
Class<?>... declaredExceptions)
Check whether the given exception is compatible with the specified
exception types, as declared in a throws clause.
|
static boolean |
ObjectUtils.isEmpty(Object obj)
Determine whether the given object is empty.
|
static boolean |
ObjectUtils.isEmpty(Object[] array)
Determine whether the given array is empty:
i.e.
|
static void |
Assert.notNull(Object object,
String message)
Assert that an object is not
null. |
static String |
ObjectUtils.nullSafeClassName(Object obj)
Determine the class name for the given object.
|
static boolean |
ObjectUtils.nullSafeEquals(Object o1,
Object o2)
Determine if the given objects are equal, returning
true if
both are null or false if only one is null. |
static boolean |
ObjectUtils.nullSafeEquals(Object o1,
Object o2)
Determine if the given objects are equal, returning
true if
both are null or false if only one is null. |
static int |
ObjectUtils.nullSafeHashCode(boolean[] array)
Return a hash code based on the contents of the specified array.
|
static int |
ObjectUtils.nullSafeHashCode(byte[] array)
Return a hash code based on the contents of the specified array.
|
static int |
ObjectUtils.nullSafeHashCode(char[] array)
Return a hash code based on the contents of the specified array.
|
static int |
ObjectUtils.nullSafeHashCode(double[] array)
Return a hash code based on the contents of the specified array.
|
static int |
ObjectUtils.nullSafeHashCode(float[] array)
Return a hash code based on the contents of the specified array.
|
static int |
ObjectUtils.nullSafeHashCode(int[] array)
Return a hash code based on the contents of the specified array.
|
static int |
ObjectUtils.nullSafeHashCode(long[] array)
Return a hash code based on the contents of the specified array.
|
static int |
ObjectUtils.nullSafeHashCode(Object obj)
Return as hash code for the given object; typically the value of
Object#hashCode()}. |
static int |
ObjectUtils.nullSafeHashCode(Object[] array)
Return a hash code based on the contents of the specified array.
|
static int |
ObjectUtils.nullSafeHashCode(short[] array)
Return a hash code based on the contents of the specified array.
|
static String |
ObjectUtils.nullSafeToString(boolean[] array)
Return a String representation of the contents of the specified array.
|
static String |
ObjectUtils.nullSafeToString(byte[] array)
Return a String representation of the contents of the specified array.
|
static String |
ObjectUtils.nullSafeToString(char[] array)
Return a String representation of the contents of the specified array.
|
static String |
ObjectUtils.nullSafeToString(double[] array)
Return a String representation of the contents of the specified array.
|
static String |
ObjectUtils.nullSafeToString(float[] array)
Return a String representation of the contents of the specified array.
|
static String |
ObjectUtils.nullSafeToString(int[] array)
Return a String representation of the contents of the specified array.
|
static String |
ObjectUtils.nullSafeToString(long[] array)
Return a String representation of the contents of the specified array.
|
static String |
ObjectUtils.nullSafeToString(Object obj)
Return a String representation of the specified Object.
|
static String |
ObjectUtils.nullSafeToString(Object[] array)
Return a String representation of the contents of the specified array.
|
static String |
ObjectUtils.nullSafeToString(short[] array)
Return a String representation of the contents of the specified array.
|
static Object[] |
ObjectUtils.toObjectArray(Object source)
Convert the given array (which may be a primitive array) to an
object array (if necessary of primitive wrapper objects).
|
static Object |
ObjectUtils.unwrapOptional(Object obj)
Unwrap the given object which is potentially a
Optional. |
Copyright © 2021. All rights reserved.