public abstract class DistributedCacher extends Cacher
RedisCacher and
the certain types of the JCacheCacher can be distributed (without
special development).RedisCacher,
JCacheCacher| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CONTENT |
protected java.lang.ThreadLocal<java.security.MessageDigest> |
hashers |
protected int |
maxParamsLength |
broker, logger, name| Constructor and Description |
|---|
DistributedCacher() |
DistributedCacher(int maxKeyLength) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getCacheKey(java.lang.String name,
io.datatree.Tree params,
java.lang.String... keys)
Creates a cacher-specific key by name and params.
|
int |
getMaxParamsLength() |
void |
setMaxParamsLength(int maxParamsLength) |
appendToKey, appendTree, clean, del, get, install, serializeKey, setprotected static final java.lang.String CONTENT
protected int maxParamsLength
protected final java.lang.ThreadLocal<java.security.MessageDigest> hashers
public DistributedCacher()
public DistributedCacher(int maxKeyLength)
public java.lang.String getCacheKey(java.lang.String name,
io.datatree.Tree params,
java.lang.String... keys)
getCacheKey in class Cachername - action nameparams - input (JSON) structurekeys - keys in the "params" structure (optional)public int getMaxParamsLength()
public void setMaxParamsLength(int maxParamsLength)