PluginManager
Internal architecture - Plugin lifecycle management
PluginManager (Internal)
Internal Implementation
PluginManager is an internal class. Plugins are registered through the QueryClient configuration.
The PluginManager coordinates plugin registration, validation, lifecycle management, and hook execution. It is used internally by the runtime to manage plugin state machines.
Public Usage
Plugins are registered through the QueryClient configuration:
Plugin Lifecycle
Plugins go through well-defined states:
| State | Description |
|---|---|
discovered | Plugin found |
validated | Metadata valid |
registered | Added to manager |
initialized | onBeforeInit/onAfterInit called |
active | Hooks running |
suspended | Temporarily disabled |
resuming | Being resumed from suspension |
stopping | Disposal in progress |
disposed | Cleaned up |
removed | Unregistered from manager |
error | Initialization failed |
Hooks
| Hook | When |
|---|---|
onBeforeInit | Before initialization |
onAfterInit | After initialization |
onBeforeQuery | Before query execution |
onAfterQuery | After query completion |
onBeforeMutation | Before mutation |
onAfterMutation | After mutation |
onCacheUpdated | Cache entry updated |
onCacheInvalidated | Cache entry invalidated |
onShutdown | Runtime shutdown |
onSuspend | Plugin suspended |
onResume | Plugin resumed |
onDispose | Plugin disposed |