Package com.illumon.iris.controller
Class PersistentQuery
java.lang.Object
com.illumon.iris.controller.PersistentQuery
The PersistentQuery class is a set of static methods that can be used to interact with the current state of the
active Persistent Query. These methods are only relevant in the context of an Enterprise worker.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The exception thrown when the requested session cannot be found. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic int
addSession
(ScriptSession newSession, ExportedObjectClient client) Add a newScriptSession
to this PQ for the specifiedclient
.static void
static ScriptSession
createSession
(PersistentQueryConfiguration config, Map<String, Object> variableMap, Function<Constructor<? extends ScriptSession>, ScriptSession> constructionWrapper) static void
disableSource
(IrisDbGroovySession groovySession) static void
extractTableAndWidgetMetadata
(Map<String, Object> currentScope, Map<String, String[]> localTableGroups, Map<String, ExportedObjectInfo> localObjects) static QueryScope
getQueryScope
(int sessionKey) Get theQueryScope
for the specified session key.static ScriptSession
getScriptSession
(int sessionKey) static PersistentQueryState
getSessionState
(PersistentQueryConfiguration config, ScriptSession session, String typeSpecificStateJson) static PersistentQueryState
getStateWithoutSession
(PersistentQueryConfiguration config, String typeSpecificStateJson) static boolean
removeSession
(int id) Remove the specified session from this querystatic void
setPrimaryScriptSession
(ScriptSession session) static void
setVisibility
(PersistentQueryConfiguration config, RemoteQueryProcessor remoteQueryProcessor)
-
Field Details
-
PERSISTENT_QUERY_CONFIG_VARIABLE_NAME
- See Also:
-
PERSISTENT_QUERY_SERIAL_NUMBER_VARIABLE_NAME
- See Also:
-
PERSISTENT_QUERY_OWNER_VARIABLE_NAME
- See Also:
-
PERSISTENT_QUERY_NAME_VARIABLE_NAME
- See Also:
-
PROCESS_INFO_ID_VARIABLE_NAME
- See Also:
-
-
Method Details
-
checkPrimaryScriptSession
public static void checkPrimaryScriptSession() -
createSession
public static ScriptSession createSession(@NotNull PersistentQueryConfiguration config, @NotNull Map<String, Object> variableMap, @NotNull Function<Constructor<? extends ScriptSession>, ScriptSession> constructionWrapper) -
setPrimaryScriptSession
-
setVisibility
public static void setVisibility(@NotNull PersistentQueryConfiguration config, @NotNull RemoteQueryProcessor remoteQueryProcessor) -
getSessionState
public static PersistentQueryState getSessionState(PersistentQueryConfiguration config, ScriptSession session, @Nullable String typeSpecificStateJson) -
getStateWithoutSession
public static PersistentQueryState getStateWithoutSession(PersistentQueryConfiguration config, @Nullable String typeSpecificStateJson) -
extractTableAndWidgetMetadata
-
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
-