public class JIDWeigher extends Object implements com.github.benmanes.caffeine.cache.Weigher<String,ValueWrapper<String>>
| Constructor and Description |
|---|
JIDWeigher() |
| Modifier and Type | Method and Description |
|---|---|
static int |
sizeOfString(String string)
Returns the size in bytes of a String.
|
static int |
sizeOfValueWrapper(ValueWrapper<String> value)
Returns the size in bytes of a String.
|
int |
weigh(@NonNull String key,
@NonNull ValueWrapper<String> value)
Returns the weight of a cache entry.
|
public int weigh(@NonNull String key, @NonNull ValueWrapper<String> value)
weigh in interface com.github.benmanes.caffeine.cache.Weigher<String,ValueWrapper<String>>key - the key to weighvalue - the value to weighpublic static int sizeOfString(String string)
string - the String to determine the size of.public static int sizeOfValueWrapper(ValueWrapper<String> value)
value - the object to determine the size of.Copyright © 2009–2020 Ignite Realtime. All rights reserved.