public class ObjectCache extends java.lang.Object implements CacheI
Constructor and Description |
---|
ObjectCache(long _maxSize) |
ObjectCache(long _maxSize,
long _maxCount) |
ObjectCache(long _maxSize,
long _maxCount,
ObjectCache _parent) |
ObjectCache(long _maxSize,
long _maxCount,
ObjectCache _parent,
boolean _redundant) |
ObjectCache(long _maxSize,
long _maxCount,
ObjectCache _parent,
boolean _redundant,
GCStrategy _gcStrategy) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
java.lang.Object |
computeIfAbsent(java.lang.Object key,
java.util.function.Function mappingFunction) |
boolean |
contains(java.lang.Object key) |
boolean |
contains(java.lang.String key)
Check if there is any object matching the given key in the cache.
|
boolean |
contains(java.lang.String key,
java.lang.Object obj)
Check if the given obj is already in the cache under the given key.
|
java.lang.Object |
get(java.lang.Object key) |
java.lang.Object[] |
get(java.lang.Object[] keys) |
java.lang.Object |
get(java.lang.String key)
Returns the Object referenced by String key from the cache (or
from the parent cache, if we have one).
|
long |
getCurrentCount() |
long |
getCurrentSize() |
long |
getMaxCount() |
long |
getMaxSize() |
ObjectCache |
getParent() |
boolean |
isRedundant() |
void |
put(java.lang.Object key,
java.lang.Object obj) |
void |
put(java.lang.String key,
java.lang.Object obj,
long size)
Put object obj with size size referenced by key key into the cache,
possibly removing some old object(s) when we don't have enough room.
|
void |
remove(java.lang.Object key) |
void |
remove(java.lang.String key)
Removes the Object referenced by String key from the cache.
|
void |
setCurrentCount(long $3) |
void |
setCurrentSize(long $5) |
void |
setMaxCount(long $2) |
void |
setMaxSize(long $4) |
void |
setParent(ObjectCache $6) |
void |
setRedundant(boolean $7) |
public ObjectCache(long _maxSize)
public ObjectCache(long _maxSize, long _maxCount)
public ObjectCache(long _maxSize, long _maxCount, ObjectCache _parent)
public ObjectCache(long _maxSize, long _maxCount, ObjectCache _parent, boolean _redundant)
public ObjectCache(long _maxSize, long _maxCount, ObjectCache _parent, boolean _redundant, GCStrategy _gcStrategy)
public void put(java.lang.Object key, java.lang.Object obj)
public void put(java.lang.String key, java.lang.Object obj, long size)
public void remove(java.lang.String key)
public boolean contains(java.lang.String key)
public boolean contains(java.lang.String key, java.lang.Object obj)
public java.lang.Object get(java.lang.String key)
public java.lang.Object computeIfAbsent(java.lang.Object key, java.util.function.Function mappingFunction)
computeIfAbsent
in interface CacheI
public long getMaxCount()
public void setMaxCount(long $2)
public long getCurrentCount()
public void setCurrentCount(long $3)
public long getMaxSize()
public void setMaxSize(long $4)
public long getCurrentSize()
public void setCurrentSize(long $5)
public ObjectCache getParent()
public void setParent(ObjectCache $6)
public boolean isRedundant()
public void setRedundant(boolean $7)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.