|
Fray Engine
|
Owns and coordinates projects, their queues, application work, prompts, and logs. Project work runs on separate project threads; drive manager operations from one controlling thread. More...
#include <fray_manager.hpp>
Classes | |
| struct | OpeningDecisionStatus |
| Latest database-choice action and its result, once it finishes. More... | |
| struct | OpeningOrigin |
| Address of the process that requested a project open. More... | |
| struct | OpeningStatus |
| A queued project open and its result, once finished. More... | |
| struct | ProjectLogWorker |
| Dedicated queue and worker for one project's log writes. More... | |
| struct | Entry |
| Associates a project and its queue with its managed worker thread. More... | |
| struct | ShutdownEntry |
| Project resources retained while shutdown progresses. More... | |
| struct | PendingPrompt |
| Retains a prompt request and its eventual response until consumed. More... | |
| struct | CloseTaskGuard |
| Ensures a queued close clears its closing marker even on early exit. More... | |
Public Types | |
| enum class | OpeningDecision { resolve , cancel } |
| The queued action applied to a project's database choice. More... | |
| enum class | ShutdownPhase { running , stopping , ready } |
| Progress of an Engine-owned shutdown request. More... | |
| using | RenameNotifier |
| Callback receiving a renamed project's ID, new path key, and name. | |
Public Member Functions | |
| logs::LogStore & | logStore () |
| Returns the manager-owned log store by reference. | |
| void | forwardLogEntry (const logs::Entry &entry, ipc::IPCManager &ipc, bool includeLoading) |
| Sends a prepared log line to the renderer with a limited lifetime. | |
| void | queueConsoleEntry (const logs::Entry &entry, ipc::IPCManager &ipc, bool includeLoading=true) |
| Queues a prepared entry for Console delivery independently of persistence. | |
| void | recordCommand (const message::InData &incoming, ipc::IPCManager &ipc, bool received) |
| Splits a stamped command into its disk log record and its Console entry, honoring the message's flags. The record is written under the command's UID unless MESSAGE_FLAG_NO_LOG is set; the Console is sent a COMMAND_CONSOLE_ADD unless MESSAGE_FLAG_NO_CONSOLE is set. Both go onto their own queues and return at once; neither waits for the other or for delivery. | |
| void | handleReceipt (const message::InData &incoming, ipc::IPCManager &ipc) |
| Handles a MSG_RECEIPT: logs it under its own UID and tells the Console the original command arrived. The log record is skipped when the original had MESSAGE_FLAG_NO_LOG, and the Console message when it had MESSAGE_FLAG_NO_CONSOLE. A known entry gets a COMMAND_CONSOLE_UPDATE; if the Engine no longer holds the UID, a COMMAND_CONSOLE_ADD is sent instead, as already received, built from what the receipt carries. This is the only place a receipt becomes a Console message. Invalid receipts are logged and ignored. | |
| void | handleNotification (const message::InData &incoming, ipc::IPCManager &ipc) |
| Handles COMMAND_NOTIFY: logs the notification and adds it to the Console as a notification entry. The log record is skipped when MESSAGE_FLAG_NO_LOG is set and the Console message when MESSAGE_FLAG_NO_CONSOLE is set. Both go onto their own queues and return at once. Invalid payloads are logged and ignored. | |
| void | addNotification (ProcessKind sender, NotificationSeverity severity, const std::string &title, const std::string &description, const std::string &project, std::uint32_t flags, ipc::IPCManager &ipc, const std::string &uid="", ProcessKind destination=PROCESS_KIND_ENGINE) |
| Logs a notification and adds it to the Console, as handleNotification does for received ones. Safe from any thread; both go onto their own queues and return at once. | |
| ConsoleEntry | describeCommand (const message::InData &incoming) |
| Describes a command as a Console entry. | |
| void | stopConsoleDelivery () |
| Stops and drains Console delivery before its IPC manager is destroyed. Call from the controlling thread, not from the Console worker. | |
| void | beginConsoleShutdown () |
| Stops accepting Console deliveries while allowing its queued work to drain. | |
| bool | consoleStopped () const |
| Returns whether the Console delivery worker has finished its local queue. | |
| void | persistLogEntry (const logs::Entry &entry) |
| Queues persistence on the project's worker or the application worker. | |
| void | recordLogEntry (logs::Entry entry, ipc::IPCManager *ipc, bool includeLoading=true) |
| Identifies a log entry and submits it independently to Console and persistence. Application writes are submitted before Console delivery so a subsequent history request sees them. | |
| void | recordEngineLog (const char *level, F_long thread, const std::string &project, const char *text, ipc::IPCManager *ipc, std::uint64_t arrivedUs=0, bool consoleVisible=true) |
| Prepares an Engine log line and independently queues Console delivery and persistence. | |
| FrayManager (const std::string &applicationId="Fray") | |
| Constructs a manager with its own thread manager and application worker. | |
| FrayManager (threads::ThreadManager &threads, const std::string &applicationId="Fray") | |
| Constructs a manager using an externally owned thread manager. | |
| FrayManager (const FrayManager &)=delete | |
| Copy construction is disabled because the manager owns running work. | |
| FrayManager & | operator= (const FrayManager &)=delete |
| Copy assignment is disabled because the manager owns running work. | |
| ~FrayManager () | |
| Shuts down owned work and releases the process-wide manager slot. | |
| F_err | openApplicationState (const std::filesystem::path &directory) |
| Opens the application directory and its default state namespace. | |
| F_err | loadButtonStyle (const std::string &defaults, std::string &css) |
| Loads the Engine-owned application button stylesheet. | |
| F_err | saveButtonStyle (const std::string &css) |
| Saves the Engine-owned application button stylesheet. | |
| F_err | switchApplicationState (const std::filesystem::path &path) |
| Selects and persists an existing application database without replacing active state on failure. Previously borrowed application state references become invalid after a successful switch. | |
| std::filesystem::path | applicationStatePath () |
| Returns the currently open application database path. | |
| F_err | readApplicationPreferences (ApplicationPreferences &output) |
| Reads an authoritative application preferences snapshot. | |
| F_err | resetApplicationPreferences () |
| Resets only application preference values in one database transaction. | |
| F_err | openState (const std::string &name) |
| Opens an additional application state namespace. | |
| state::StateManager & | state (const std::string &name) |
| Returns a borrowed reference to an open application state namespace. | |
| template<typename T> | |
| F_err | set (const std::string &key, const T &value) |
| Writes a value in the default application state namespace. | |
| template<typename T> | |
| F_err | get (const std::string &key, T &value) |
| Reads a value from the default application state namespace. | |
| void | requestShutdown () |
| Starts or retries Engine-owned shutdown without joining any worker. Previously accepted application work drains; new application work is rejected. | |
| void | shutdown () |
| Requests shutdown without waiting for project work or worker termination. | |
| ShutdownPhase | advanceShutdown () |
| Advances shutdown using only local state and nonblocking queue operations. Pending opens, closes and worker termination are checked independently. | |
| ShutdownPhase | shutdownPhase () |
| Reads shutdown progress without advancing it. | |
| void | finishShutdown () |
| Releases local workers after shutdown is ready. The normal Engine path calls this only after advanceShutdown reports ready. If an owner destroys the manager early, this safety fallback joins its active local workers. Call on the controlling thread, never from a worker being joined. | |
| void | cancelPrompts (const std::string &reason, bool closing=false) |
| Completes outstanding prompts as dismissed with an error under _promptMutex. | |
| bool | takePromptResponse (uint64_t requestId, PromptResponse &response) |
| Consumes a completed prompt response under _promptMutex. | |
| const std::string & | applicationId () const |
| Returns the application identifier by reference. | |
| bool | postApplication (std::function< void()> task) |
| Posts work to the application thread without waiting for it. | |
| void | handleApplicationMessage (const message::InData &incoming, ipc::IPCManager &ipc) |
| Routes an incoming Engine message, dispatching project work asynchronously. Called by the Engine message thread; may stop IPC or enqueue application work. | |
| bool | requestPrompt (ipc::IPCManager &ipc, const PromptRequest &request, uint64_t &requestId) |
| Sends a renderer prompt and tracks its response under _promptMutex. | |
| F_err | openProject (const std::string &path, files::ConflictChoice choice=files::ConflictChoice::Ask, bool cancelOnDatabaseConflict=false, files::OpenMode mode=files::OpenMode::OpenOrCreate, std::optional< OpeningOrigin > origin=std::nullopt, std::optional< std::size_t > restoreOrder=std::nullopt, const std::string &expectedId="") |
| Queues a project open on its own worker. | |
| std::optional< OpeningStatus > | openingStatus (const std::string &path) |
| Reads the latest project-open state for a folder or archive path. | |
| void | setOpeningNotifier (std::function< void(const OpeningStatus &)> notifier) |
| Installs a publisher for completed project-open states. | |
| std::vector< std::string > | databaseCandidates (const std::string &name) |
| Lists candidate databases for an opening project. | |
| F_err | resolveDatabase (const std::string &name, const DatabaseChoice &choice) |
| Queues a database choice on the project thread. Inspect openingDecisionStatus() for its eventual result. | |
| F_err | cancelProject (const std::string &name) |
| Queues cancellation of a pending open and retires it after cancellation. Inspect openingDecisionStatus() for its eventual result. | |
| std::optional< OpeningDecisionStatus > | openingDecisionStatus (const std::string &path) |
| Reads the latest queued database-choice action for a project path. The result remains available after cancellation until the path is opened again. | |
| ProjectManager & | project (const std::string &name) |
| Returns a non-owning reference to an open project under registry lookup. The reference is valid only while the project remains registered. | |
| F_err | restoreProjects (ipc::IPCManager &ipc) |
| Queues restoration of the saved project session when enabled. | |
| void | setClosingNotifier (std::function< void(const ProjectClosingStatuses &)> notifier) |
| Installs a nonblocking pending-close snapshot notifier and sends its initial snapshot. | |
| void | setRenameNotifier (RenameNotifier notifier) |
| Installs the rename callback under _mutex unless the manager is marked shut down. | |
| void | setRenameFailureNotifier (std::function< void(const std::string &)> notifier) |
| Installs a notifier for asynchronously failed project renames. | |
| void | setShutdownCloseNotifier (std::function< void(const std::string &name, const std::string &id, F_err result, bool packaged, const std::string &path)> notifier) |
| Installs the callback reporting projects closed by shutdown, under _mutex unless the manager is marked shut down. | |
| void | setLogResolvedNotifier (std::function< void(const std::string &openingTag, const std::string &id)> notifier) |
| Installs the opening-log resolution callback under _mutex unless the manager is marked shut down. | |
| void | requestCloseProject (const std::string &target, bool package, std::function< void(const std::string &, F_err, bool)> completion) |
| Queues a project close without waiting for completion. | |
| F_err | closeProject (const std::string &name) |
| Queues a project close and removes its registry entry on success. Retired workers are joined later, after they have stopped. | |
| std::optional< ProjectManager::CloseStatus > | closeStatus (const std::string &name) |
| Reads the latest project close state, including after registry removal. | |
| F_err | close () |
| Queues all open project closes independently; entries remain registered. Already queued closes are included; repeated calls while pending add any newly open projects. | |
| std::optional< ProjectManager::CloseStatus > | closeAllStatus () |
| Reads the latest aggregate close state. | |
Static Public Member Functions | |
| static void | sendConsoleEntry (Command operation, const ConsoleEntry &entry, ipc::IPCManager &ipc) |
| Sends a Console entry to the Renderer without waiting; a dropped send is not retried. | |
Private Types | |
| using | Projects = std::unordered_map<std::string, Entry> |
| Registry mapping canonical project path keys to owned project entries. | |
Private Member Functions | |
| ProjectClosingStatuses | closingStatusesLocked () |
| Builds the pending-close snapshot without taking a project lock. Caller holds _mutex, including when a project worker is stalled. | |
| void | publishClosingLocked () |
| Publishes the current pending-close snapshot while holding _mutex. | |
| std::string | logProjectIdentity (const std::string &target) |
| Resolves a message's project target to its log identity without changing dispatch. | |
| Projects::iterator | lookup (const std::string &target, F_err &error, bool includeClosed=false) |
| Looks up a project by path or unique bare name; caller must hold _mutex. | |
| std::optional< Entry > | find (const std::string &name, F_err &error, bool includeClosed=false) |
| Looks up and copies an entry under _mutex. | |
| F_err | queueOpeningDecision (const std::string &name, OpeningDecision action, const DatabaseChoice &choice, bool shutdownAction=false) |
| Queues a database-choice action and records its result locally. | |
| void | retire (Entry &entry) |
| Shuts down a project queue and joins its worker. Call outside _mutex and not on the worker being joined. | |
| void | retainRetiredLocked (Entry entry) |
| Stops an entry's queues and retains it until its workers can safely be joined. Caller holds _mutex; neither worker is joined here. | |
| void | reapRetired () |
| Joins already-finished retired workers without waiting for active projects. Call outside _mutex and outside a retired worker. | |
| void | forgetProject (ProjectManager *project) |
| Removes a project from open order and closes its tracked log. Caller holds _mutex; this does not remove the registry entry. | |
| bool | isActiveProjectLocked (const ProjectManager *project) const |
| Tests whether a project is the currently active eligible project. Caller holds _mutex. | |
| F_err | saveShutdownSessionLocked () |
| Writes the captured project session to application state. Caller holds _mutex. | |
| void | captureShutdownSessionLocked () |
| Captures open project identities and paths before shutdown starts closing them. Caller holds _mutex after accepted application work has drained. | |
| void | updateShutdownSessionPath (const std::string &id, const std::string &path) |
| Updates the shutdown snapshot after a queued rename has finished. | |
| void | notifyRenameFailure (const std::string &id) |
| Reports an asynchronous rename failure without holding the manager mutex. | |
| void | finishLogRename (const std::string &id, const std::shared_ptr< ProjectLogWorker > &worker, const std::shared_ptr< threads::TaskQueue > &queue, const std::shared_ptr< ProjectManager > &project, const std::filesystem::path &folder, F_err result) |
| Resumes logging and releases any close deferred behind a rename on the log worker. | |
| void | attachLog (ProjectManager *project) |
| Registers queued project-log rename coordination after opening. Call without holding _mutex because this installs a project callback. | |
| F_err | reserveProjectIdentity (ProjectManager *project) |
| Reserves a unique identity and updates a copied project's persisted identity if necessary. The registry reservation prevents concurrent project workers from choosing the same identity. | |
| F_err | registerOpenedProject (ProjectManager *project) |
| Reserves identity and registers a successfully opened project. | |
| void | recordOpen (ProjectManager *project) |
| Records an open project, opens its log, and resolves its opening tag. Opens and flushes the project log without holding the manager mutex. Log entries received during opening are held on the log worker until the session is ready. | |
| void | rekey (ProjectManager *project, const std::filesystem::path &path) |
| Updates the registry and notifies listeners after a project rename. Takes _mutex, retains a colliding closed entry for later retirement, and calls the notifier outside it. | |
| F_err | applyApplicationDefaults (state::StateManager &state) |
| Adds missing application preference defaults without replacing saved values. | |
| F_err | validateApplicationState (state::StateManager &state) |
| Verifies that an existing state table is an application database. | |
| F_err | validateApplicationPreferences (state::StateManager &state) |
| Validates the types of saved application preferences that are present. | |
| void | init () |
| Claims the process-wide manager slot and starts application, log, and Console workers. | |
| F_err | switchApplicationStateLocked (const std::filesystem::path &path, bool persist) |
| Switches to an existing application database while retaining the current one on failure. Caller must hold _mutex. | |
| void | queueLogClose (const std::shared_ptr< ProjectManager > &project, const std::shared_ptr< threads::TaskQueue > &queue, const std::shared_ptr< ProjectLogWorker > &worker, const std::string &id, std::function< void(ProjectManager &, const std::shared_ptr< threads::TaskQueue > &)> task) |
| Closes the project log on its worker, then returns close work to the project queue. | |
| F_err | enqueueProjectTask (const std::string &target, bool allowLatest, bool closing, std::function< void(ProjectManager &, const std::shared_ptr< threads::TaskQueue > &)> task, ProjectManager *exact=nullptr) |
| Finds an open project and posts work to its queue under _mutex. | |
| F_err | enqueueProjectTaskLocked (const std::string &target, bool allowLatest, bool closing, std::function< void(ProjectManager &, const std::shared_ptr< threads::TaskQueue > &)> task, ProjectManager *exact) |
| Selects and queues project work while the caller holds _mutex. | |
| void | finishCloseAllMemberLocked (ProjectManager *project, F_err result) |
| Records an aggregate member's result while holding _mutex. | |
| void | finishProjectClose (ProjectManager &project, const std::shared_ptr< threads::TaskQueue > &queue, F_err result, bool removeOnSuccess=false) |
| Clears the closing marker and, on success, forgets the project and stops its queue. Takes _mutex and updates any active aggregate close. | |
| F_err | queueProjectClose (const std::string &target, std::function< F_err(ProjectManager &, bool &)> operation, std::function< void(const std::string &, F_err, bool)> completion, ProjectManager *exact=nullptr, bool removeOnSuccess=false) |
| Queues a close operation; an empty target selects the latest open project. If supplied, completion runs on the project thread, or on the caller if dispatch fails. | |
| void | handleProjectMessage (const message::InData &incoming, ipc::IPCManager &ipc) |
| Validates and dispatches a project message to its project queue. | |
| void | announceActiveProject (ipc::IPCManager &ipc) |
| Announces the most recently opened eligible project and its saved layout. Selects under _mutex, reads layout on the project thread, and queues renderer messages. | |
| void | watchProjectOpenings (ipc::IPCManager &ipc) |
| Installs independent project-opening result and active-project announcements. | |
| void | handleLogMessage (const message::InData &incoming, ipc::IPCManager &ipc) |
| Stores and forwards incoming log entries or sends a filtered log page. | |
| void | watchRenames (ipc::IPCManager &ipc) |
| Installs callbacks forwarding project renames and resolved opening log tags. Callbacks capture ipc by reference and are cleared on shutdown. | |
Static Private Member Functions | |
| static std::string | projectKey (const std::string &path, std::error_code &error) |
| Canonicalizes a project path, removing a .fry extension. | |
| static std::string | openingTag (const ProjectManager *project) |
| Creates the temporary log tag used while a project opens. | |
| static void | toProto (const logs::Entry &entry, LogEntry &out) |
| Copies a stored log entry into its protobuf representation. | |
Private Attributes | |
| std::string | _applicationId |
| Application identifier supplied when opening projects. | |
| std::filesystem::path | _applicationDirectory |
| Engine directory containing the selected-database location file. | |
| std::unique_ptr< files::FileManager > | _files = std::make_unique<files::FileManager>() |
| Application directory and database ownership; state managers detach before this is destroyed. | |
| std::unordered_map< std::string, std::unique_ptr< state::StateManager > > | _states |
| Open application state namespaces, guarded by _mutex. | |
| std::unique_ptr< threads::ThreadManager > | _ownedThreads |
| Optional owned thread manager used by the standalone constructor. | |
| threads::ThreadManager * | _threads |
| Non-owning pointer to the owned or externally supplied thread manager. | |
| threads::ThreadManager::Id | _applicationThread = 0 |
| Identifier of the application queue worker. | |
| std::shared_ptr< threads::TaskQueue > | _applicationQueue = std::make_shared<threads::TaskQueue>() |
| Queue for application-level work, separate from project queues. | |
| threads::ThreadManager::Id | _consoleThread = 0 |
| Independent worker for forwarding prepared Console entries. | |
| std::shared_ptr< threads::TaskQueue > | _consoleQueue = std::make_shared<threads::TaskQueue>() |
| Queue of Console deliveries; it does not wait for log persistence. | |
| console::EntryList | _consoleEntries |
| Console entries the Engine owns; only the Console worker changes them. | |
| std::atomic< bool > | _consoleStopping {false} |
| Whether new Console deliveries are disabled during final local teardown. | |
| threads::ThreadManager::Id | _logThread = 0 |
| Worker for application log writes and history reads. | |
| std::shared_ptr< threads::TaskQueue > | _logQueue = std::make_shared<threads::TaskQueue>() |
| Serializes application log writes and asynchronous history reads. | |
| std::mutex | _projectLogsMutex |
| Protects the opening-tag and project-ID log routes. | |
| std::unordered_map< std::string, std::shared_ptr< ProjectLogWorker > > | _projectLogRoutes |
| Routes project IDs and temporary opening tags to their dedicated workers. | |
| std::unordered_map< std::string, std::shared_ptr< ProjectLogWorker > > | _projectLogPaths |
| Resolves registered project paths to log workers; guarded by _projectLogsMutex. | |
| bool | _shutdown = false |
| Whether shutdown has progressed past application queue termination; guarded by _mutex. | |
| ShutdownPhase | _shutdownPhase = ShutdownPhase::running |
| Shutdown state and project ownership; guarded by _mutex. | |
| std::unordered_map< ProjectManager *, ShutdownEntry > | _shutdownEntries |
| ProjectSession | _shutdownSession |
| Shutdown snapshot and capture state; guarded by _mutex. | |
| bool | _shutdownSessionCaptured = false |
| std::uint64_t | _activeAnnouncementRevision = 0 |
| Monotonic ordering for active-project announcements; guarded by _mutex. | |
| std::mutex | _mutex |
| Protects the project registry, ordering, closing state, shutdown state, and notifiers. | |
| std::function< void(const std::string &id, const std::string &path, const std::string &name)> | _renameNotifier |
| Rename callback receiving project ID, canonical path key, and name; guarded by _mutex. | |
| std::function< void(const std::string &id)> | _renameFailureNotifier |
| Reports asynchronously failed project renames; guarded by _mutex. | |
| std::function< void(const std::string &openingTag, const std::string &id)> | _logResolvedNotifier |
| Callback mapping an opening log tag to a project ID; guarded by _mutex. | |
| std::function< void(const std::string &name, const std::string &id, F_err result, bool packaged, const std::string &path)> | _shutdownCloseNotifier |
| Callback reporting a project closed by shutdown: name, ID, result, whether it was packaged, and resulting path; guarded by _mutex. | |
| Projects | _projects |
| Project entries keyed by canonical working path; guarded by _mutex. | |
| std::unordered_map< std::string, OpeningDecisionStatus > | _openingDecisions |
| Latest queued database-choice action for each canonical project path, guarded by _mutex. | |
| std::unordered_map< std::string, OpeningStatus > | _openingStatuses |
| Latest project open for each canonical path, guarded by _mutex. | |
| std::function< void(const OpeningStatus &)> | _openingNotifier |
| Publisher for opening state changes, guarded by _mutex. | |
| std::vector< Entry > | _retiredProjects |
| Closed project workers retained until they have both stopped; guarded by _mutex. | |
| std::vector< ProjectManager * > | _openOrder |
| Non-owning projects in opening order; guarded by _mutex. | |
| std::unordered_set< ProjectManager * > | _closingProjects |
| Non-owning projects with a queued close in progress; guarded by _mutex. | |
| std::unordered_map< std::string, ProjectManager::CloseStatus > | _closeStatuses |
| Latest close state by project path, retained after removal; guarded by _mutex. | |
| std::unordered_map< ProjectManager *, std::string > | _closeStatusKeys |
| Original path for each active close, guarded by _mutex. | |
| std::optional< ProjectManager::CloseStatus > | _closeAllStatus |
| Latest aggregate close state; guarded by _mutex. | |
| std::unordered_set< ProjectManager * > | _closeAllProjects |
| Projects still included in the active aggregate close; guarded by _mutex. | |
| bool | _closeAllFailed = false |
| Whether an aggregate close member failed; guarded by _mutex. | |
| std::uint64_t | _closingRevision = 0 |
| Revision of the pending-close snapshot, guarded by _mutex. | |
| std::function< void(const ProjectClosingStatuses &)> | _closingNotifier |
| Queues a snapshot notification; invoked under _mutex and must not block. | |
| logs::LogStore | _logs |
| Store for engine and project log entries. | |
| std::unordered_map< ProjectManager *, std::string > | _logIds |
| Maps non-owning project pointers to their open log IDs; guarded by _mutex. | |
| std::mutex | _promptMutex |
| Protects pending prompts and prompt shutdown state. | |
| std::unordered_map< uint64_t, PendingPrompt > | _pendingPrompts |
| Pending prompts indexed by request message ID; guarded by _promptMutex. | |
| bool | _promptClosing = false |
| Rejects new prompts after closing begins; guarded by _promptMutex. | |
Static Private Attributes | |
| static std::atomic< bool > | _active {false} |
| Process-wide guard against multiple live managers. | |
| static FrayManager * | _acceptedApplicationTask = nullptr |
| Identifies application work accepted before shutdown on its worker thread. | |
Owns and coordinates projects, their queues, application work, prompts, and logs. Project work runs on separate project threads; drive manager operations from one controlling thread.
Definition at line 37 of file fray_manager.hpp.
|
private |
Registry mapping canonical project path keys to owned project entries.
Definition at line 230 of file fray_manager.hpp.
Callback receiving a renamed project's ID, new path key, and name.
Definition at line 3121 of file fray_manager.hpp.
|
strong |
The queued action applied to a project's database choice.
| Enumerator | |
|---|---|
| resolve | |
| cancel | |
Definition at line 41 of file fray_manager.hpp.
|
strong |
Progress of an Engine-owned shutdown request.
| Enumerator | |
|---|---|
| running | |
| stopping | |
| ready | |
Definition at line 74 of file fray_manager.hpp.
|
inlineexplicit |
Constructs a manager with its own thread manager and application worker.
| applicationId | Identifier passed to projects. |
| std::logic_error | If another manager is active. |
Definition at line 1516 of file fray_manager.hpp.
|
inlineexplicit |
Constructs a manager using an externally owned thread manager.
| threads | Thread manager that must outlive this manager. |
| applicationId | Identifier passed to projects. |
| std::logic_error | If another manager is active. |
Definition at line 1531 of file fray_manager.hpp.
|
delete |
Copy construction is disabled because the manager owns running work.
|
inline |
Shuts down owned work and releases the process-wide manager slot.
Definition at line 1552 of file fray_manager.hpp.
|
inline |
Logs a notification and adds it to the Console, as handleNotification does for received ones. Safe from any thread; both go onto their own queues and return at once.
| sender | Process the notification is attributed to. |
| severity | Notification severity. |
| title | Nonempty title. |
| description | Optional detail text. |
| project | Stable project ID, or empty for the application. |
| flags | Message flags selecting whether it is logged and shown in the Console. |
| ipc | IPC manager that must remain alive until stopConsoleDelivery completes. |
| uid | Entry UID; empty generates a new one. |
| destination | Process the notification was addressed to. |
Definition of FrayManager::addNotification.
Definition at line 775 of file fray_message_handler.hpp.
|
inline |
Advances shutdown using only local state and nonblocking queue operations. Pending opens, closes and worker termination are checked independently.
Definition at line 1949 of file fray_manager.hpp.
|
inlineprivate |
Announces the most recently opened eligible project and its saved layout. Selects under _mutex, reads layout on the project thread, and queues renderer messages.
Announces the most recently opened eligible project and its saved layout to the renderer. Selects under _mutex, reads layout on the project queue, and installs rename and log callbacks; sends are queued.
| ipc | IPC manager that must outlive queued work and registered callbacks. |
Definition at line 369 of file project_message_handler.hpp.
|
inline |
Returns the application identifier by reference.
Definition at line 2246 of file fray_manager.hpp.
|
inline |
Returns the currently open application database path.
Definition at line 1749 of file fray_manager.hpp.
|
inlineprivate |
Adds missing application preference defaults without replacing saved values.
| state | Open default application state. |
Definition at line 1185 of file fray_manager.hpp.
|
inlineprivate |
Registers queued project-log rename coordination after opening. Call without holding _mutex because this installs a project callback.
| project | Open project whose log follows folder renames. |
Definition at line 846 of file fray_manager.hpp.
|
inline |
Stops accepting Console deliveries while allowing its queued work to drain.
Definition at line 1413 of file fray_manager.hpp.
|
inline |
Queues cancellation of a pending open and retires it after cancellation. Inspect openingDecisionStatus() for its eventual result.
| name | Project path or unique bare name. |
Definition at line 2619 of file fray_manager.hpp.
|
inline |
Completes outstanding prompts as dismissed with an error under _promptMutex.
| reason | Error text placed in each incomplete response. |
| closing | Whether to reject future prompt requests. |
Definition at line 2206 of file fray_manager.hpp.
|
inlineprivate |
Captures open project identities and paths before shutdown starts closing them. Caller holds _mutex after accepted application work has drained.
Definition at line 716 of file fray_manager.hpp.
|
inline |
Queues all open project closes independently; entries remain registered. Already queued closes are included; repeated calls while pending add any newly open projects.
Definition at line 3284 of file fray_manager.hpp.
|
inline |
Reads the latest aggregate close state.
Definition at line 3328 of file fray_manager.hpp.
|
inline |
Queues a project close and removes its registry entry on success. Retired workers are joined later, after they have stopped.
| name | Project path or unique bare name; a closed registered entry can also be removed. |
Definition at line 3196 of file fray_manager.hpp.
|
inline |
Reads the latest project close state, including after registry removal.
| name | Project path or unique bare name. |
Definition at line 3239 of file fray_manager.hpp.
|
inlineprivate |
Builds the pending-close snapshot without taking a project lock. Caller holds _mutex, including when a project worker is stalled.
Definition at line 279 of file fray_manager.hpp.
|
inline |
Returns whether the Console delivery worker has finished its local queue.
Definition at line 1420 of file fray_manager.hpp.
|
inline |
Lists candidate databases for an opening project.
| name | Project path or unique bare name. |
Definition at line 2589 of file fray_manager.hpp.
|
inline |
Describes a command as a Console entry.
| incoming | Command stamped with its UID. |
Definition of FrayManager::describeCommand.
Definition at line 667 of file fray_message_handler.hpp.
|
inlineprivate |
Finds an open project and posts work to its queue under _mutex.
| target | Path or unique bare name; empty can select the latest project. |
| allowLatest | Whether an empty target selects the most recently opened project. |
| closing | Whether to mark the project as closing until the task finishes. |
| task | Work receiving the project and its shared queue on the project thread. |
| exact | Optional registered project to select instead of target. |
Definition at line 2737 of file fray_manager.hpp.
|
inlineprivate |
Selects and queues project work while the caller holds _mutex.
| target | Path or unique bare name; empty can select the latest project. |
| allowLatest | Whether an empty target selects the latest project. |
| closing | Whether this is a close task. |
| task | Work receiving the selected project and its queue. |
| exact | Optional registered project to select instead of target. |
Definition at line 2757 of file fray_manager.hpp.
|
inlineprivate |
Looks up and copies an entry under _mutex.
| name | Project path or unique bare name. |
| error | Receives the lookup result. |
| includeClosed | Whether to include closed entries. |
Definition at line 489 of file fray_manager.hpp.
|
inlineprivate |
Records an aggregate member's result while holding _mutex.
| project | Project whose close finished or could not be dispatched. |
| result | Close result. |
Definition at line 2881 of file fray_manager.hpp.
|
inlineprivate |
Resumes logging and releases any close deferred behind a rename on the log worker.
| id | Project log identity. |
| worker | Project log worker. |
| queue | Project task queue. |
| project | Project retained while the rename finishes. |
| folder | Final working folder. |
| result | Project rename result. |
Definition at line 797 of file fray_manager.hpp.
|
inlineprivate |
Clears the closing marker and, on success, forgets the project and stops its queue. Takes _mutex and updates any active aggregate close.
| project | Project whose close finished. |
| queue | Project queue to shut down on success. |
| result | Close result; NONE indicates success. |
| removeOnSuccess | Whether to remove the project from the registry. |
Definition at line 2902 of file fray_manager.hpp.
|
inline |
Releases local workers after shutdown is ready. The normal Engine path calls this only after advanceShutdown reports ready. If an owner destroys the manager early, this safety fallback joins its active local workers. Call on the controlling thread, never from a worker being joined.
Definition at line 2092 of file fray_manager.hpp.
|
inlineprivate |
Removes a project from open order and closes its tracked log. Caller holds _mutex; this does not remove the registry entry.
| project | Non-owning project pointer to forget. |
Definition at line 670 of file fray_manager.hpp.
|
inline |
Sends a prepared log line to the renderer with a limited lifetime.
Sends a prepared log entry to the renderer with a five-second lifetime.
| entry | Prepared line to forward. |
| ipc | IPC manager used to send it; must remain alive during the call. |
| includeLoading | Whether this line belongs in the startup window. |
Definition at line 885 of file fray_message_handler.hpp.
|
inline |
Reads a value from the default application state namespace.
| T | Value type supported by StateManager. |
| key | State key to read. |
| value | Receives the value on success. |
Definition at line 1895 of file fray_manager.hpp.
|
inline |
Routes an incoming Engine message, dispatching project work asynchronously. Called by the Engine message thread; may stop IPC or enqueue application work.
Routes an Engine application message, dispatching project work asynchronously. Runs on the Engine message thread; quit starts local shutdown, prompts update under _promptMutex, and create work is posted to the application queue.
| incoming | Parsed incoming message. |
| ipc | IPC manager used for replies; must outlive queued work. |
Performs the filesystem operation on the application queue.
Definition at line 241 of file fray_message_handler.hpp.
|
inlineprivate |
Stores and forwards incoming log entries or sends a filtered log page.
Stores and forwards external log entries or sends filtered log pages to the renderer. Invalid payloads and unsupported senders are ignored.
| incoming | Parsed log message. |
| ipc | IPC manager used to send renderer messages. |
Definition at line 911 of file fray_message_handler.hpp.
|
inline |
Handles COMMAND_NOTIFY: logs the notification and adds it to the Console as a notification entry. The log record is skipped when MESSAGE_FLAG_NO_LOG is set and the Console message when MESSAGE_FLAG_NO_CONSOLE is set. Both go onto their own queues and return at once. Invalid payloads are logged and ignored.
| incoming | Notification stamped with its UID. |
| ipc | IPC manager that must remain alive until stopConsoleDelivery completes. |
Definition of FrayManager::handleNotification.
Definition at line 749 of file fray_message_handler.hpp.
|
inlineprivate |
Validates and dispatches a project message to its project queue.
Validates and posts a project message to the selected project queue. Close failures receive a reply; failed layout dispatch triggers an active-project resync.
| incoming | Parsed message to route. |
| ipc | IPC manager for asynchronous replies; must outlive queued work. |
Definition at line 444 of file project_message_handler.hpp.
|
inline |
Handles a MSG_RECEIPT: logs it under its own UID and tells the Console the original command arrived. The log record is skipped when the original had MESSAGE_FLAG_NO_LOG, and the Console message when it had MESSAGE_FLAG_NO_CONSOLE. A known entry gets a COMMAND_CONSOLE_UPDATE; if the Engine no longer holds the UID, a COMMAND_CONSOLE_ADD is sent instead, as already received, built from what the receipt carries. This is the only place a receipt becomes a Console message. Invalid receipts are logged and ignored.
| incoming | Receipt from the destination process, carrying a Receipt payload. |
| ipc | IPC manager that must remain alive until stopConsoleDelivery completes. |
Definition of FrayManager::handleReceipt.
Definition at line 824 of file fray_message_handler.hpp.
|
inlineprivate |
Claims the process-wide manager slot and starts application, log, and Console workers.
| std::logic_error | If another manager is active. |
Definition at line 1254 of file fray_manager.hpp.
|
inlineprivate |
Tests whether a project is the currently active eligible project. Caller holds _mutex.
| project | Registered project to check. |
Definition at line 688 of file fray_manager.hpp.
|
inline |
Loads the Engine-owned application button stylesheet.
| defaults | Packaged stylesheet used only on first load. |
| css | Receives the saved stylesheet. |
Definition at line 1625 of file fray_manager.hpp.
|
inlineprivate |
Resolves a message's project target to its log identity without changing dispatch.
| target | Project path, unique name, stable ID, or opening tag. |
Definition at line 379 of file fray_manager.hpp.
|
inline |
Returns the manager-owned log store by reference.
Definition at line 1293 of file fray_manager.hpp.
|
inlineprivate |
Looks up a project by path or unique bare name; caller must hold _mutex.
| target | Project path or bare name. |
| error | Receives NONE, PROJECT_NOT_FOUND, or PROJECT_AMBIGUOUS. |
| includeClosed | Whether to include entries that are neither open nor opening. |
Definition at line 438 of file fray_manager.hpp.
|
inlineprivate |
Reports an asynchronous rename failure without holding the manager mutex.
| id | Stable project identity. |
Definition at line 776 of file fray_manager.hpp.
|
inline |
Opens the application directory and its default state namespace.
| directory | Existing directory containing the application database. |
Definition at line 1563 of file fray_manager.hpp.
|
inline |
Reads the latest queued database-choice action for a project path. The result remains available after cancellation until the path is opened again.
| path | Project folder or archive path. |
Definition at line 2631 of file fray_manager.hpp.
|
inline |
Reads the latest project-open state for a folder or archive path.
| path | Project folder or archive path. |
Definition at line 2557 of file fray_manager.hpp.
|
inlinestaticprivate |
Creates the temporary log tag used while a project opens.
| project | Project whose address identifies the opening. |
Definition at line 766 of file fray_manager.hpp.
|
inline |
Queues a project open on its own worker.
| path | Project folder or archive path. |
| choice | Folder/archive conflict policy. |
| cancelOnDatabaseConflict | Whether to cancel a pending database choice automatically. |
| mode | Whether to open, create, or resolve an existing folder. |
| origin | Optional message origin for publishing the eventual result. |
| restoreOrder | Optional saved ordering used for startup restoration. |
| expectedId | Optional saved identity that a restored project must match. |
Definition at line 2308 of file fray_manager.hpp.
|
inline |
Opens an additional application state namespace.
| name | State namespace to open. |
Definition at line 1829 of file fray_manager.hpp.
|
delete |
Copy assignment is disabled because the manager owns running work.
|
inline |
Queues persistence on the project's worker or the application worker.
| entry | Prepared entry to persist. |
Definition at line 1429 of file fray_manager.hpp.
|
inline |
Posts work to the application thread without waiting for it.
| task | Work to enqueue. |
Restores the previous application task marker.
Definition at line 2253 of file fray_manager.hpp.
|
inline |
Returns a non-owning reference to an open project under registry lookup. The reference is valid only while the project remains registered.
| name | Project path or unique bare name. |
| std::invalid_argument | If the name is ambiguous. |
| std::out_of_range | If the project is not open. |
Definition at line 2655 of file fray_manager.hpp.
|
inlinestaticprivate |
Canonicalizes a project path, removing a .fry extension.
| path | Project folder or archive path; empty and embedded-NUL paths are invalid. |
| error | Receives invalid_argument or a filesystem error on failure. |
Definition at line 355 of file fray_manager.hpp.
|
inlineprivate |
Publishes the current pending-close snapshot while holding _mutex.
Definition at line 312 of file fray_manager.hpp.
|
inline |
Queues a prepared entry for Console delivery independently of persistence.
| entry | Prepared entry copied into the queue. |
| ipc | IPC manager that must remain alive until stopConsoleDelivery completes. |
| includeLoading | Whether this line belongs in the startup window. |
Definition at line 1312 of file fray_manager.hpp.
|
inlineprivate |
Closes the project log on its worker, then returns close work to the project queue.
| project | Project retained until the close task runs. |
| queue | Project's task queue. |
| worker | Project's log worker. |
| id | Project log identity. |
| task | Project close work. |
Definition at line 2677 of file fray_manager.hpp.
|
inlineprivate |
Queues a database-choice action and records its result locally.
| name | Project path or unique bare name. |
| action | Action to apply. |
| choice | Database selection used when resolving. |
| shutdownAction | Whether this is the manager's own shutdown cancellation. |
Definition at line 507 of file fray_manager.hpp.
|
inlineprivate |
Queues a close operation; an empty target selects the latest open project. If supplied, completion runs on the project thread, or on the caller if dispatch fails.
| target | Project path, unique bare name, or empty for latest. |
| operation | Close work receiving the project and a packaged output flag. |
| completion | Callback receiving project name or target, result, and whether packaging occurred. |
| exact | Optional registered project to select instead of target. |
| removeOnSuccess | Whether successful close removes the registry entry. |
Definition at line 3006 of file fray_manager.hpp.
|
inline |
Reads an authoritative application preferences snapshot.
| output | Receives the complete snapshot on success. |
Definition at line 1761 of file fray_manager.hpp.
|
inlineprivate |
Joins already-finished retired workers without waiting for active projects. Call outside _mutex and outside a retired worker.
Definition at line 644 of file fray_manager.hpp.
|
inline |
Splits a stamped command into its disk log record and its Console entry, honoring the message's flags. The record is written under the command's UID unless MESSAGE_FLAG_NO_LOG is set; the Console is sent a COMMAND_CONSOLE_ADD unless MESSAGE_FLAG_NO_CONSOLE is set. Both go onto their own queues and return at once; neither waits for the other or for delivery.
| incoming | Command stamped with its UID. |
| ipc | IPC manager that must remain alive until stopConsoleDelivery completes. |
| received | True when the Engine itself is the destination, so the entry is added as already received; false when a receipt from the destination is still to come. |
Definition of FrayManager::recordCommand.
Definition at line 705 of file fray_message_handler.hpp.
|
inline |
Prepares an Engine log line and independently queues Console delivery and persistence.
| level | Log severity. |
| thread | Originating thread identifier. |
| project | Project ID or temporary opening tag. |
| text | Log text. |
| ipc | Optional non-owning IPC manager; null stores without forwarding. |
| arrivedUs | Captured arrival time in microseconds, or zero to stamp now. |
| consoleVisible | Whether this entry may be delivered to the Console. |
Definition at line 1489 of file fray_manager.hpp.
|
inline |
Identifies a log entry and submits it independently to Console and persistence. Application writes are submitted before Console delivery so a subsequent history request sees them.
| entry | Unstamped log entry. |
| ipc | Optional IPC manager used for Console delivery. |
| includeLoading | Whether this line belongs in the startup window. |
Definition at line 1463 of file fray_manager.hpp.
|
inlineprivate |
Records an open project, opens its log, and resolves its opening tag. Opens and flushes the project log without holding the manager mutex. Log entries received during opening are held on the log worker until the session is ready.
| project | Project to register if still open and present. |
Definition at line 1023 of file fray_manager.hpp.
|
inlineprivate |
Reserves identity and registers a successfully opened project.
| project | Project on its own worker. |
Definition at line 1000 of file fray_manager.hpp.
|
inlineprivate |
Updates the registry and notifies listeners after a project rename. Takes _mutex, retains a colliding closed entry for later retirement, and calls the notifier outside it.
| project | Renamed project. |
| path | New working path to canonicalize. |
Definition at line 1133 of file fray_manager.hpp.
|
inline |
Queues a project close without waiting for completion.
| target | Project path, unique bare name, or empty for the latest project. |
| package | Whether to package the project when closing. |
| completion | Callback receiving name or target, close result, and whether packaging occurred; runs on the project thread or caller on dispatch failure. |
Definition at line 3179 of file fray_manager.hpp.
|
inline |
Sends a renderer prompt and tracks its response under _promptMutex.
Validates and sends a prompt to the renderer, tracking its eventual response. Takes _promptMutex while registering and sending; does not wait for a response.
| ipc | IPC manager used to send the request. |
| request | Prompt with a nonblank title and nonblank labeled buttons. |
| requestId | Receives the generated message ID only on success. |
Definition at line 192 of file fray_message_handler.hpp.
|
inline |
Starts or retries Engine-owned shutdown without joining any worker. Previously accepted application work drains; new application work is rejected.
Definition at line 1913 of file fray_manager.hpp.
|
inlineprivate |
Reserves a unique identity and updates a copied project's persisted identity if necessary. The registry reservation prevents concurrent project workers from choosing the same identity.
| project | Open project to register. |
Definition at line 941 of file fray_manager.hpp.
|
inline |
Resets only application preference values in one database transaction.
Definition at line 1793 of file fray_manager.hpp.
|
inline |
Queues a database choice on the project thread. Inspect openingDecisionStatus() for its eventual result.
| name | Project path or unique bare name. |
| choice | Database selection to apply. |
Definition at line 2606 of file fray_manager.hpp.
|
inline |
Queues restoration of the saved project session when enabled.
| ipc | IPC manager that must outlive queued work. |
Definition of FrayManager::restoreProjects.
Definition at line 123 of file fray_message_handler.hpp.
|
inlineprivate |
Stops an entry's queues and retains it until its workers can safely be joined. Caller holds _mutex; neither worker is joined here.
| entry | Removed project entry. |
Definition at line 631 of file fray_manager.hpp.
|
inlineprivate |
Shuts down a project queue and joins its worker. Call outside _mutex and not on the worker being joined.
| entry | Project entry whose worker is retired. |
Definition at line 601 of file fray_manager.hpp.
|
inline |
Saves the Engine-owned application button stylesheet.
| css | Complete stylesheet text. |
Definition at line 1638 of file fray_manager.hpp.
|
inlineprivate |
Writes the captured project session to application state. Caller holds _mutex.
Definition at line 702 of file fray_manager.hpp.
|
inlinestatic |
Sends a Console entry to the Renderer without waiting; a dropped send is not retried.
| operation | COMMAND_CONSOLE_ADD or COMMAND_CONSOLE_UPDATE. |
| entry | Entry to send. |
| ipc | IPC manager used to send the frame. |
Definition of FrayManager::sendConsoleEntry.
Definition at line 691 of file fray_message_handler.hpp.
|
inline |
Writes a value in the default application state namespace.
| T | Value type supported by StateManager. |
| key | State key to write. |
| value | Value to persist. |
Definition at line 1873 of file fray_manager.hpp.
|
inline |
Installs a nonblocking pending-close snapshot notifier and sends its initial snapshot.
| notifier | Callback invoked under _mutex; it must only queue work and must not reenter this manager. |
Definition at line 3106 of file fray_manager.hpp.
|
inline |
Installs the opening-log resolution callback under _mutex unless the manager is marked shut down.
| notifier | Callback receiving the temporary opening tag and project ID; empty clears it. |
Definition at line 3165 of file fray_manager.hpp.
|
inline |
Installs a publisher for completed project-open states.
| notifier | Publisher invoked outside the manager lock; empty clears it. |
Definition at line 2576 of file fray_manager.hpp.
|
inline |
Installs a notifier for asynchronously failed project renames.
| notifier | Callback receiving the stable project ID. |
Definition at line 3140 of file fray_manager.hpp.
|
inline |
Installs the rename callback under _mutex unless the manager is marked shut down.
| notifier | Callback receiving project ID, new path key, and name; empty clears it. |
Definition at line 3128 of file fray_manager.hpp.
|
inline |
Installs the callback reporting projects closed by shutdown, under _mutex unless the manager is marked shut down.
| notifier | Callback receiving name, ID, result, packaged flag and path; empty clears it. It runs on a project worker and must only queue work. |
Definition at line 3152 of file fray_manager.hpp.
|
inline |
Requests shutdown without waiting for project work or worker termination.
Definition at line 1939 of file fray_manager.hpp.
|
inline |
Reads shutdown progress without advancing it.
Definition at line 2080 of file fray_manager.hpp.
|
inline |
Returns a borrowed reference to an open application state namespace.
| name | State namespace to find. |
| std::out_of_range | If the namespace is not open. |
Definition at line 1855 of file fray_manager.hpp.
|
inline |
Stops and drains Console delivery before its IPC manager is destroyed. Call from the controlling thread, not from the Console worker.
Definition at line 1406 of file fray_manager.hpp.
|
inline |
Selects and persists an existing application database without replacing active state on failure. Previously borrowed application state references become invalid after a successful switch.
| path | Existing application database file. |
Definition at line 1733 of file fray_manager.hpp.
|
inlineprivate |
Switches to an existing application database while retaining the current one on failure. Caller must hold _mutex.
| path | Existing application database file. |
| persist | Whether to update the Engine-adjacent selected-database location. |
Definition at line 1653 of file fray_manager.hpp.
|
inline |
Consumes a completed prompt response under _promptMutex.
| requestId | Message ID returned by requestPrompt. |
| response | Receives the response on success; unchanged otherwise. |
Definition at line 2230 of file fray_manager.hpp.
|
inlinestaticprivate |
Copies a stored log entry into its protobuf representation.
| entry | Stored log entry. |
| out | Protobuf to populate. |
Definition at line 3059 of file fray_manager.hpp.
|
inlineprivate |
Updates the shutdown snapshot after a queued rename has finished.
| id | Stable project identity. |
| path | Final working-folder path before close or packaging. |
Definition at line 744 of file fray_manager.hpp.
|
inlineprivate |
Validates the types of saved application preferences that are present.
| state | Open default application state. |
Definition at line 1228 of file fray_manager.hpp.
|
inlineprivate |
Verifies that an existing state table is an application database.
| state | Open state namespace. |
Definition at line 1210 of file fray_manager.hpp.
|
inlineprivate |
Installs independent project-opening result and active-project announcements.
| ipc | IPC manager that must outlive queued work. |
Definition of FrayManager::watchProjectOpenings.
Definition at line 104 of file fray_message_handler.hpp.
|
inlineprivate |
Installs callbacks forwarding project renames and resolved opening log tags. Callbacks capture ipc by reference and are cleared on shutdown.
Registers renderer notifications for renames and resolved opening log tags. Callbacks capture ipc by reference; shutdown clears them.
| ipc | IPC manager that must outlive the callbacks. |
Definition at line 313 of file project_message_handler.hpp.
|
inlinethread_localstaticprivate |
Identifies application work accepted before shutdown on its worker thread.
Definition at line 207 of file fray_manager.hpp.
|
inlinestaticprivate |
Process-wide guard against multiple live managers.
Definition at line 149 of file fray_manager.hpp.
|
private |
Monotonic ordering for active-project announcements; guarded by _mutex.
Definition at line 205 of file fray_manager.hpp.
|
private |
Engine directory containing the selected-database location file.
Definition at line 155 of file fray_manager.hpp.
|
private |
Application identifier supplied when opening projects.
Definition at line 153 of file fray_manager.hpp.
|
private |
Queue for application-level work, separate from project queues.
Definition at line 175 of file fray_manager.hpp.
|
private |
Identifier of the application queue worker.
Definition at line 171 of file fray_manager.hpp.
|
private |
Whether an aggregate close member failed; guarded by _mutex.
Definition at line 260 of file fray_manager.hpp.
|
private |
Projects still included in the active aggregate close; guarded by _mutex.
Definition at line 258 of file fray_manager.hpp.
|
private |
Latest aggregate close state; guarded by _mutex.
Definition at line 256 of file fray_manager.hpp.
|
private |
Latest close state by project path, retained after removal; guarded by _mutex.
Definition at line 252 of file fray_manager.hpp.
|
private |
Original path for each active close, guarded by _mutex.
Definition at line 254 of file fray_manager.hpp.
|
private |
Queues a snapshot notification; invoked under _mutex and must not block.
Definition at line 264 of file fray_manager.hpp.
|
private |
Non-owning projects with a queued close in progress; guarded by _mutex.
Definition at line 250 of file fray_manager.hpp.
|
private |
Revision of the pending-close snapshot, guarded by _mutex.
Definition at line 262 of file fray_manager.hpp.
|
private |
Console entries the Engine owns; only the Console worker changes them.
Definition at line 181 of file fray_manager.hpp.
|
private |
Queue of Console deliveries; it does not wait for log persistence.
Definition at line 179 of file fray_manager.hpp.
|
private |
Whether new Console deliveries are disabled during final local teardown.
Definition at line 183 of file fray_manager.hpp.
|
private |
Independent worker for forwarding prepared Console entries.
Definition at line 177 of file fray_manager.hpp.
|
private |
Application directory and database ownership; state managers detach before this is destroyed.
Definition at line 157 of file fray_manager.hpp.
|
private |
Maps non-owning project pointers to their open log IDs; guarded by _mutex.
Definition at line 272 of file fray_manager.hpp.
|
private |
Serializes application log writes and asynchronous history reads.
Definition at line 187 of file fray_manager.hpp.
|
private |
Callback mapping an opening log tag to a project ID; guarded by _mutex.
Definition at line 221 of file fray_manager.hpp.
|
private |
Store for engine and project log entries.
Definition at line 268 of file fray_manager.hpp.
|
private |
Worker for application log writes and history reads.
Definition at line 185 of file fray_manager.hpp.
|
private |
Protects the project registry, ordering, closing state, shutdown state, and notifiers.
Definition at line 211 of file fray_manager.hpp.
|
private |
Latest queued database-choice action for each canonical project path, guarded by _mutex.
Definition at line 236 of file fray_manager.hpp.
|
private |
Publisher for opening state changes, guarded by _mutex.
Definition at line 240 of file fray_manager.hpp.
|
private |
Latest project open for each canonical path, guarded by _mutex.
Definition at line 238 of file fray_manager.hpp.
|
private |
Non-owning projects in opening order; guarded by _mutex.
Definition at line 246 of file fray_manager.hpp.
|
private |
Optional owned thread manager used by the standalone constructor.
Definition at line 163 of file fray_manager.hpp.
|
private |
Pending prompts indexed by request message ID; guarded by _promptMutex.
Definition at line 343 of file fray_manager.hpp.
|
private |
Resolves registered project paths to log workers; guarded by _projectLogsMutex.
Definition at line 193 of file fray_manager.hpp.
|
private |
Routes project IDs and temporary opening tags to their dedicated workers.
Definition at line 191 of file fray_manager.hpp.
|
private |
Protects the opening-tag and project-ID log routes.
Definition at line 189 of file fray_manager.hpp.
|
private |
Project entries keyed by canonical working path; guarded by _mutex.
Definition at line 234 of file fray_manager.hpp.
|
private |
Rejects new prompts after closing begins; guarded by _promptMutex.
Definition at line 347 of file fray_manager.hpp.
|
private |
Protects pending prompts and prompt shutdown state.
Definition at line 339 of file fray_manager.hpp.
|
private |
Reports asynchronously failed project renames; guarded by _mutex.
Definition at line 217 of file fray_manager.hpp.
|
private |
Rename callback receiving project ID, canonical path key, and name; guarded by _mutex.
Definition at line 215 of file fray_manager.hpp.
|
private |
Closed project workers retained until they have both stopped; guarded by _mutex.
Definition at line 242 of file fray_manager.hpp.
|
private |
Whether shutdown has progressed past application queue termination; guarded by _mutex.
Definition at line 197 of file fray_manager.hpp.
|
private |
Callback reporting a project closed by shutdown: name, ID, result, whether it was packaged, and resulting path; guarded by _mutex.
Definition at line 226 of file fray_manager.hpp.
|
private |
Definition at line 200 of file fray_manager.hpp.
|
private |
Shutdown state and project ownership; guarded by _mutex.
Definition at line 199 of file fray_manager.hpp.
|
private |
Shutdown snapshot and capture state; guarded by _mutex.
Definition at line 202 of file fray_manager.hpp.
|
private |
Definition at line 203 of file fray_manager.hpp.
|
private |
Open application state namespaces, guarded by _mutex.
Definition at line 159 of file fray_manager.hpp.
|
private |
Non-owning pointer to the owned or externally supplied thread manager.
Definition at line 167 of file fray_manager.hpp.