public class ScriptCache extends Object
| Constructor and Description |
|---|
ScriptCache(int maxEntries)
Creates a new instance.
|
ScriptCache(int maxEntries,
long maxAge)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
EvaluatableScriptAdapter |
computeIfAbsent(String id,
Function<String,EvaluatableScriptAdapter> function) |
void |
remove(String key) |
public ScriptCache(int maxEntries)
maxEntries - the maximum number of entries to keep in the cachepublic ScriptCache(int maxEntries,
long maxAge)
maxEntries - the maximum number of entries to keep in the cachemaxAge - the time in milliseconds that an entry can stay in the cache. If -1, entries never expirepublic EvaluatableScriptAdapter computeIfAbsent(String id, Function<String,EvaluatableScriptAdapter> function)
public void remove(String key)
Copyright © 2021 JBoss by Red Hat. All rights reserved.