public final class DroolsWorkingMemoryStore extends Object implements org.eurekaclinical.datastore.DataStore<String,org.drools.StatefulSession>
| Constructor and Description |
|---|
DroolsWorkingMemoryStore(org.eurekaclinical.datastore.DataStoreFactory storeFactory,
String dbName,
org.drools.RuleBase ruleBase) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
close() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,org.drools.StatefulSession>> |
entrySet()
Returns a collection view of the map.
|
org.drools.StatefulSession |
get(Object key)
Gets a working memory from the data store.
|
boolean |
isClosed() |
boolean |
isEmpty() |
Set<String> |
keySet() |
org.drools.StatefulSession |
put(String key,
org.drools.StatefulSession value)
Puts the working memory into the data store.
|
void |
putAll(Map<? extends String,? extends org.drools.StatefulSession> m)
Writes all of the keyId-working memory pairs in the given map to the data
store.
|
org.drools.StatefulSession |
remove(Object key) |
int |
size() |
Collection<org.drools.StatefulSession> |
values()
Gets the working memories from this data store.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic DroolsWorkingMemoryStore(org.eurekaclinical.datastore.DataStoreFactory storeFactory,
String dbName,
org.drools.RuleBase ruleBase)
throws IOException
IOExceptionpublic void close()
close in interface AutoCloseableclose in interface org.eurekaclinical.datastore.DataStore<String,org.drools.StatefulSession>public boolean isClosed()
isClosed in interface org.eurekaclinical.datastore.DataStore<String,org.drools.StatefulSession>public org.drools.StatefulSession get(Object key)
get in interface Map<String,org.drools.StatefulSession>get in interface org.eurekaclinical.datastore.DataStore<String,org.drools.StatefulSession>key - the keyId.null if the data store
contains no working memory for the given keyId.public org.drools.StatefulSession put(String key, org.drools.StatefulSession value)
put in interface Map<String,org.drools.StatefulSession>put in interface org.eurekaclinical.datastore.DataStore<String,org.drools.StatefulSession>key - the keyId.value - the working memory.IOError - if an error occurs writing the key and working memory to
the data store.public int size()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey in interface Map<String,org.drools.StatefulSession>containsKey in interface org.eurekaclinical.datastore.DataStore<String,org.drools.StatefulSession>public boolean containsValue(Object value)
containsValue in interface Map<String,org.drools.StatefulSession>containsValue in interface org.eurekaclinical.datastore.DataStore<String,org.drools.StatefulSession>public org.drools.StatefulSession remove(Object key)
public void putAll(Map<? extends String,? extends org.drools.StatefulSession> m)
putAll in interface Map<String,org.drools.StatefulSession>putAll in interface org.eurekaclinical.datastore.DataStore<String,org.drools.StatefulSession>m - a map of keyId-working memory pairs.IOError - if an error occurs writing a working memory to the data
store.public void clear()
public Collection<org.drools.StatefulSession> values()
Copyright © 2012–2018 Emory University. All rights reserved.