- All Known Subinterfaces:
RuleSession<S>,StatefulSession,StatelessSession
- All Known Implementing Classes:
AbstractSessionWrapper
public interface MemoryStreaming
Provides streaming methods for handling in-memory facts.
This interface is extended by both
StatefulSession and StatelessSession.
Note that for stateless sessions, invoking any streaming method will trigger the session to fire,
and no further operations on the session will be possible afterward.-
Method Summary
Modifier and TypeMethodDescription<T> Stream<Map.Entry<FactHandle,T>> streamFactEntries(Class<T> type) <T> Stream<Map.Entry<FactHandle,T>> streamFactEntries(String type) default <T> Stream<T>streamFacts(Class<T> type) default <T> Stream<T>streamFacts(String type)
-
Method Details
-
streamFactEntries
Stream<Map.Entry<FactHandle,Object>> streamFactEntries()- Returns:
- a stream of all fact entries and their fact handles
-
streamFactEntries
- Type Parameters:
T- the type of facts to stream- Parameters:
type- the logical type of the facts- Returns:
- a stream of fact entries of the specified logical type
- See Also:
-
streamFactEntries
- Type Parameters:
T- the type of facts to stream- Parameters:
type- the Java type of the facts- Returns:
- a stream of fact entries of the specified logical type
-
streamFacts
- Returns:
- a stream of all facts
-
streamFacts
- Type Parameters:
T- the type of facts to stream- Parameters:
type- the logical type of the facts as a string- Returns:
- a stream of facts of the specified logical type
- See Also:
-
streamFacts
- Type Parameters:
T- the type of facts to stream- Parameters:
type- the Java type of the facts- Returns:
- a stream of facts of the specified type
-