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 -
Field Summary
Fields Modifier and Type Field Description static StringPERSISTENT_QUERY_CONFIG_VARIABLE_NAMEstatic StringPERSISTENT_QUERY_NAME_VARIABLE_NAMEstatic StringPERSISTENT_QUERY_OWNER_VARIABLE_NAMEstatic StringPERSISTENT_QUERY_SERIAL_NUMBER_VARIABLE_NAME -
Method Summary
-
Field Details
-
Method Details
-
getWorker
-
checkPrimaryScriptSession
public static void checkPrimaryScriptSession() -
createSession
public static ScriptSession createSession(PersistentQueryConfiguration config, @NotNull Map<String,Object> variableMap, Function<Constructor<? extends ScriptSession>,ScriptSession> constructionWrapper) -
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) -
extractTableAndWidgetMetadata
-
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
-