public class TxRuleCache extends Object
| Constructor and Description |
|---|
TxRuleCache(EmbeddedGraknTx tx) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeTx()
cleans cache contents
|
<T> T |
getRule(Rule rule,
java.util.function.Supplier<T> converter) |
java.util.stream.Stream<Rule> |
getRules() |
java.util.stream.Stream<Rule> |
getRulesWithType(SchemaConcept type) |
java.util.stream.Stream<Rule> |
getRulesWithType(SchemaConcept type,
boolean direct) |
Set<Rule> |
updateRules(SchemaConcept type,
Rule rule) |
public TxRuleCache(EmbeddedGraknTx tx)
public java.util.stream.Stream<Rule> getRules()
public Set<Rule> updateRules(SchemaConcept type, Rule rule)
type - to be updaterule - to be appendedpublic java.util.stream.Stream<Rule> getRulesWithType(SchemaConcept type)
type - for which rules containing it in the head are soughtpublic java.util.stream.Stream<Rule> getRulesWithType(SchemaConcept type, boolean direct)
type - for which rules containing it in the head are soughtdirect - way of assessing isa edgespublic <T> T getRule(Rule rule, java.util.function.Supplier<T> converter)
T - type of object converter converts torule - for which the parsed rule should be retrievedconverter - rule converterpublic void closeTx()
Copyright © 2018 Grakn Labs Ltd. All rights reserved.