plainbox.impl.session.legacy – Legacy suspend/resume API

class plainbox.impl.session.legacy.ISessionStateLegacyAPI[source]

Interface describing legacy parts of the SessionState API.

clean()[source]

Clean the session directory.

jobs_io_log_dir[source]

pathname of the jobs IO logs directory

This is not None only between calls to open() / close().

open[source]

Open session state for running jobs.

This function creates the cache directory where jobs can store their data. See: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

persistent_save()[source]

Save to disk the minimum needed to resume plainbox where it stopped

previous_session_file()[source]

Check the filesystem for previous session data Returns the full pathname to the session file if it exists

remove()[source]

Remove this session

resume()[source]

Erase the job_state_map and desired_job_list with the saved ones

session_data_filename = 'session.json'
session_dir[source]

pathname of a temporary directory for this session

This is not None only between calls to open() / close().

plainbox.impl.session.legacy.SessionStateLegacyAPI

alias of SessionStateLegacyAPICompatImpl

class plainbox.impl.session.legacy.SessionStateLegacyAPICompatImpl(job_list)[source]

Compatibility wrapper to use new suspend/resume implementation via the original (legacy) suspend/resume API.

This subclass of SessionState implements the ISessionStateLegacyAPI interface thus allowing applications to keep using suspend/resume as they did before, without adjusting their code.

Variables:
  • _manager – Instance of SessionManager (this is a bit insane because the manager actually knows about the session too)
  • _commit_hint – Either None or a set of flags (strings) that determine what kind of actions should take place before the next time the ‘manager’ property gets accessed. This is used to implement lazy decision on how to map the open/resume/clean methods onto the SessionManager API
clean()[source]

Clean the session directory.

close()[source]

Close the session.

Legacy API, this function does absolutely nothing

jobs_io_log_dir[source]

pathname of the jobs IO logs directory

This is not None only between calls to open() / close().

manager[source]
open()[source]

Open session state for running jobs.

persistent_save()[source]

Save to disk the minimum needed to resume plainbox where it stopped

previous_session_file()[source]

Check the filesystem for previous session data Returns the full pathname to the session file if it exists

remove()[source]
resume()[source]

Erase the job_state_map and desired_job_list with the saved ones

session_dir[source]

pathname of a temporary directory for this session

This is not None only between calls to open() / close().

Previous topic

plainbox.impl.session.jobs – jobs state handling

Next topic

plainbox.impl.session.manager – manager for sessions

This Page