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 class
PersistentQuery.UnknownSessionException
-
Method Summary
Modifier and Type Method Description static int
addSession(ScriptSession newSession, ExportedObjectClient client)
Add a newScriptSession
to this PQ for the specifiedclient
.static void
checkPrimaryScriptSession()
static void
disableSource(IrisDbGroovySession groovySession)
static QueryScope
getQueryScope(int sessionKey)
Get theQueryScope
for the specified session key.static ScriptSession
getScriptSession(int sessionKey)
static PersistentQueryState
getSessionState(PersistentQueryConfiguration config, ScriptSession session, TypeSpecificQueryState typeSpecificState)
static PersistentQueryState
getStateWithoutSession(PersistentQueryConfiguration config, TypeSpecificQueryState typeSpecificState)
QueryProcessorConnection
getWorker()
static boolean
removeSession(int id)
Remove the specified session from this querystatic void
setPrimaryScriptSession(ScriptSession session)
static void
setVisibility(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 theQueryScope
for 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 newScriptSession
to 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
-