public interface SessionService
Modifier and Type | Method and Description |
---|---|
void |
deleteSession(String id)
Deletes a session.
|
void |
deleteSessions(Set<String> ids)
Deletes the sessions.
|
Session |
endSession(String id)
Ends a session.
|
Set<Session> |
getAllSessions()
Gets a list of all of the sessions for all of the users.
|
Set<Session> |
getCurrentUserSessions()
Gets a list of all of the sessions for the current user.
|
String |
getLogFileContents(String id)
Gets the log file contents for the session, if the size of the file does not exceed 5 megabytes (5,242,880
bytes).
|
String |
getLogFileContentsForEngine(String id,
EngineType engineType)
Gets the log file contents for the specified
engine that generated the file, if the size of
the file does not exceed 5 megabytes (5,242,880 bytes). |
long |
getLogFileSize(String id)
Gets the size (in bytes) of the log file for the session.
|
long |
getLogFileSizeForEngine(String id,
EngineType engineType)
Gets the size (in bytes) of the log file for the specified
engine that generated the file. |
String |
getResultsFileContents(String id)
Gets the results file for the session, if the size of the file does not exceed 5 megabytes (5,242,880 bytes).
|
String |
getResultsFileContentsForEngine(String id,
EngineType engineType)
Gets the results file for the specified
engine that generated the file, if the size of the
file does not exceed 5 megabytes (5,242,880 bytes). |
long |
getResultsFileSize(String id)
Gets the size (in bytes) of the results file for the session.
|
long |
getResultsFileSizeForEngine(String id,
EngineType engineType)
Gets the size (in bytes) of the results file for the specified
engine that generated the file. |
Session |
getSession(String id)
Gets the session with the identifier.
|
Set<Session> |
getSessionsByUser(String userId)
Gets a list of the sessions for the user with the specified userId.
|
String |
saveLogFileForEngineToCurrentUserWorkspace(String id,
EngineType engineType,
String logPath)
Saves the log file for the specified
engine to the current user's workspace, in the specified
location. |
String |
saveLogFileToCurrentUserWorkspace(String id,
String logPath)
Saves the log file for the session to the current user's workspace, in the specified location.
|
String |
saveResultsFileForEngineToCurrentUserWorkspace(String id,
EngineType engineType,
String resultsPath)
Saves the results file for the specified
engine to the current user's workspace, in the specified
location. |
String |
saveResultsFileToCurrentUserWorkspace(String id,
String resultsPath)
Saves the results file for the session to the current user's workspace, in the specified location.
|
SessionSearchResults |
search(SessionQuery query)
Searches sessions based on the specified query.
|
void deleteSession(String id) throws SessionNotFoundException, SessionException
SessionType
of
PUBLISHED_JOB
, the transient workspace
associated with the session is also be deleted.id
- The identifier of the session.SessionNotFoundException
- Thrown when the session with the identifier does not exist.SessionException
- Thrown when there is an issue when deleting the session.Session endSession(String id) throws SessionNotFoundException, SessionException
id
- The identifier of the session.SessionNotFoundException
- Thrown when the session with the identifier does not exist.SessionException
- Thrown if there is an issue when ending the session.void deleteSessions(Set<String> ids)
SessionType
of PUBLISHED_JOB
, the transient
workspace associated with the session is also be deleted.ids
- The sessions.Set<Session> getAllSessions()
Set<Session> getCurrentUserSessions()
Session getSession(String id) throws SessionNotFoundException
id
- The identifier that represents the session.SessionNotFoundException
- Thrown when the session does not exist.String getLogFileContents(String id) throws SessionNotFoundException, SessionException
If the session is
COMPOSITE
, use
getLogFileContentsForEngine(String, EngineType)
.
Note: Logs for INTERACTIVE
sessions
return cumulative logs for all submissions completed within the session.
id
- The identifier of the session.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when getting the contents of the log file.String getLogFileContentsForEngine(String id, EngineType engineType) throws SessionNotFoundException, SessionException
engine
that generated the file, if the size of
the file does not exceed 5 megabytes (5,242,880 bytes). If the file size exceeds the maximum , an
IllegalArgumentException is thrown.id
- The identifier of the session.engineType
- The type of session engine that generated the file.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when getting the contents of the log file.long getLogFileSize(String id) throws SessionNotFoundException, SessionException
COMPOSITE
, use
getLogFileSizeForEngine(String, EngineType)
.id
- The identifier of the session.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when getting the size of the log file.long getLogFileSizeForEngine(String id, EngineType engineType) throws SessionNotFoundException, SessionException
engine
that generated the file.id
- The identifier of the session.engineType
- The type of session engine that generated the file.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when getting the size of the log file.String getResultsFileContents(String id) throws SessionNotFoundException, SessionException
If the session is
COMPOSITE
, use
getResultsFileContentsForEngine(String, EngineType)
.
id
- The identifier of The session.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when getting the contents of the results file.String getResultsFileContentsForEngine(String id, EngineType engineType) throws SessionNotFoundException, SessionException
engine
that generated the file, if the size of the
file does not exceed 5 megabytes (5,242,880 bytes). If the file size exceeds the maximum, an
IllegalArgumentException is thrown.id
- The identifier of the session.engineType
- The type of session engine that generated the file.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when getting the contents of the results file.long getResultsFileSize(String id) throws SessionNotFoundException, SessionException
COMPOSITE
, use
getResultsFileSizeForEngine(String, EngineType)
.id
- The identifier of the session.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when getting the size of the results file.long getResultsFileSizeForEngine(String id, EngineType engineType) throws SessionNotFoundException, SessionException
engine
that generated the file.id
- The identifier of the session.engineType
- The type of session engine that generated the file.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when saving the contents of the results file.Set<Session> getSessionsByUser(String userId)
userId
- The userId of the user who started the session.String saveLogFileToCurrentUserWorkspace(String id, String logPath) throws SessionNotFoundException, SessionException
COMPOSITE
, use
saveLogFileForEngineToCurrentUserWorkspace(String, EngineType, String)
.id
- The identifier of the session.logPath
- The full path of destination log file.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when saving the contents of the log file.String saveLogFileForEngineToCurrentUserWorkspace(String id, EngineType engineType, String logPath) throws SessionNotFoundException, SessionException
engine
to the current user's workspace, in the specified
location.id
- The identifier of the session.engineType
- The type of session engine that generated the file.logPath
- The full path of destination log file.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when saving the contents of the log file.String saveResultsFileToCurrentUserWorkspace(String id, String resultsPath) throws SessionNotFoundException, SessionException
COMPOSITE
, use
saveResultsFileForEngineToCurrentUserWorkspace(String, EngineType, String)
.id
- The identifier of the session.resultsPath
- The full path of results file.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when saving the contents of the results file.String saveResultsFileForEngineToCurrentUserWorkspace(String id, EngineType engineType, String resultsPath) throws SessionNotFoundException, SessionException
engine
to the current user's workspace, in the specified
location.id
- The identifier of the session.engineType
- The type of system that generated the file.resultsPath
- The full path of results file.SessionNotFoundException
- Thrown when the session does not exist.SessionException
- Thrown when there is an issue when saving the contents of the results file.SessionSearchResults search(SessionQuery query) throws SessionSearchException
query
- The criteria to query sessions.SessionSearchException
- Thrown when there is an issue when searching sessions.<i>Copyright (c) 2021, SAS Institute Inc., Cary, NC, USA</i>