Package com.illumon.iris.controller
Class PersistentQuery
java.lang.Object
com.illumon.iris.controller.PersistentQuery
public class PersistentQuery extends Object
A PersistentQuery represents a single run of a Deephaven persistent query. It connects to a dispatcher, starts the query,
and manages its state.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPersistentQuery.UnknownSessionException -
Method Summary
Modifier and Type Method Description static intaddSession(ScriptSession newSession, ExportedObjectClient client)Add a newScriptSessionto this PQ for the specifiedclient.static voidcheckPrimaryScriptSession()static voiddisableSource(IrisDbGroovySession groovySession)static QueryScopegetQueryScope(int sessionKey)Get theQueryScopefor the specified session key.static ScriptSessiongetScriptSession(int sessionKey)static PersistentQueryStategetSessionState(PersistentQueryConfiguration config, ScriptSession session, TypeSpecificQueryState typeSpecificState)static PersistentQueryStategetStateWithoutSession(PersistentQueryConfiguration config, TypeSpecificQueryState typeSpecificState)QueryProcessorConnectiongetWorker()static booleanremoveSession(int id)Remove the specified session from this querystatic voidsetPrimaryScriptSession(ScriptSession session)static voidsetVisibility(PersistentQueryConfiguration config, RemoteQueryProcessor remoteQueryProcessor)
-
Method Details
-
getWorker
-
checkPrimaryScriptSession
public static void checkPrimaryScriptSession() -
setPrimaryScriptSession
-
setVisibility
public static void setVisibility(PersistentQueryConfiguration config, RemoteQueryProcessor remoteQueryProcessor) -
getSessionState
public static PersistentQueryState getSessionState(PersistentQueryConfiguration config, ScriptSession session, @Nullable TypeSpecificQueryState typeSpecificState) -
getStateWithoutSession
public static PersistentQueryState getStateWithoutSession(PersistentQueryConfiguration config, @Nullable TypeSpecificQueryState typeSpecificState) -
disableSource
-
getScriptSession
-
getQueryScope
Get theQueryScopefor the specified session key.- Parameters:
sessionKey- the identifying session key- Returns:
- the QueryScope
- Throws:
PersistentQuery.UnknownSessionException- if the session does not exist.
-
addSession
public static int addSession(@NotNull ScriptSession newSession, @NotNull ExportedObjectClient client)Add a newScriptSessionto this PQ for the specifiedclient.- Parameters:
newSession- the sessionclient- the client associated- Returns:
- the unique ID of this new session.
-
removeSession
public static boolean removeSession(int id)Remove the specified session from this query- Parameters:
id- the ID of the session.- Returns:
- true if the session was removed
-