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 classThe exception thrown when the requested session cannot be found. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intaddSession(ScriptSession newSession, ExportedObjectClient client) Add a newScriptSessionto this PQ for the specifiedclient.static voidstatic ScriptSessioncreateSession(PersistentQueryConfiguration config, Map<String, Object> variableMap, Function<Constructor<? extends ScriptSession>, ScriptSession> constructionWrapper) static voiddisableSource(IrisDbGroovySession groovySession) static voidextractTableAndWidgetMetadata(Map<String, Object> currentScope, Map<String, String[]> localTableGroups, Map<String, ExportedObjectInfo> localObjects) static QueryScopegetQueryScope(int sessionKey) Get theQueryScopefor the specified session key.static ScriptSessiongetScriptSession(int sessionKey) static PersistentQueryStategetSessionState(PersistentQueryConfiguration config, ScriptSession session, String typeSpecificStateJson) static PersistentQueryStategetStateWithoutSession(PersistentQueryConfiguration config, String typeSpecificStateJson) static booleanremoveSession(int id) Remove the specified session from this querystatic voidsetPrimaryScriptSession(ScriptSession session) static voidsetVisibility(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 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
-