You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Connection plugin manager benchmarks | The [benchmarks](../../benchmarks/README.md) subproject measures the overhead from executing Python method calls with multiple connection plugins enabled. |
32
-
| Manually-triggered performance tests | The [failover plugin performance tests](../../tests/integration/container/test_failover_performance.py) and [enhanced failure monitoring performance tests](../..tests/integration/container/test_read_write_splitting_performance.py) measure the plugins' performance under different configurations |
| Connection plugin manager benchmarks | The [benchmarks](../../benchmarks/README.md) subproject measures the overhead from executing Python method calls with multiple connection plugins enabled. |
32
+
| Manually-triggered performance tests | The [failover plugin performance tests](../../tests/integration/container/test_failover_performance.py) and [enhanced failure monitoring performance tests](../../tests/integration/container/test_read_write_splitting_performance.py) measure the plugins' performance under different configurations |
Copy file name to clipboardExpand all lines: docs/development-guide/LoadablePlugins.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -26,29 +26,29 @@ A short example of these steps is provided [below](#Example).
26
26
27
27
### Creating Custom Plugins
28
28
29
-
To create a custom plugin, create a new class that extends the [Plugin](/aws_advanced_python_wrapper/plugin.py) class.
29
+
To create a custom plugin, create a new class that extends the [Plugin](../../aws_advanced_python_wrapper/plugin.py) class.
30
30
31
31
The `Plugin` class provides a simple implementation for all `Plugin` methods. By default, requested Python database methods will be called without additional operations. This is helpful when the custom plugin only needs to override one (or a few) methods from the `Plugin` interface.
- The `ExecuteTimePlugin` only overrides the `execute` method because it is only concerned with elapsed time during execution. It does not establish new connections or set up any host list provider.
40
40
41
-
A `PluginFactory` implementation is also required for the new custom plugin. This factory class is used to register and initialize custom plugins. See [ExecuteTimePluginFactory](/aws_advanced_python_wrapper/execute_time_plugin.py) for a simple implementation example.
41
+
A `PluginFactory` implementation is also required for the new custom plugin. This factory class is used to register and initialize custom plugins. See [ExecuteTimePluginFactory](../../aws_advanced_python_wrapper/execute_time_plugin.py) for a simple implementation example.
42
42
43
43
### Subscribed Methods
44
44
45
-
When executing a Python method, the plugin manager will only call a specific plugin method if the Python method is within its set of subscribed methods. For example, the [ReadWriteSplittingPlugin](/aws_advanced_python_wrapper/read_write_splitting_plugin.py) subscribes to Python methods and setters that change the read-only value of the connection, but does not subscribe to other common `Connection` or `Cursor` methods. Consequently, this plugin will not be triggered by method calls like `Connection.commit` or `Cursor.execute`.
45
+
When executing a Python method, the plugin manager will only call a specific plugin method if the Python method is within its set of subscribed methods. For example, the [ReadWriteSplittingPlugin](../../aws_advanced_python_wrapper/read_write_splitting_plugin.py) subscribes to Python methods and setters that change the read-only value of the connection, but does not subscribe to other common `Connection` or `Cursor` methods. Consequently, this plugin will not be triggered by method calls like `Connection.commit` or `Cursor.execute`.
46
46
47
47
The `subscribed_methods` attribute specifies the set of Python methods that a plugin is subscribed to in the form of a set of strings (`Set[str]`). All plugins must implement/define the `subscribed_methods` attribute.
48
48
49
49
Plugins can subscribe to any of the standard PEP249 [Connection methods](https://peps.python.org/pep-0249/#connection-methods) or [Cursor methods](https://peps.python.org/pep-0249/#cursor-methods). They can also subscribe to the target driver methods listed in the corresponding driver dialect's `_network_bound_methods` attribute:
Plugins can also subscribe to specific [pipelines](./Pipelines.md) by including the subscription key in their `subscribed_methods` attribute and implementing the equivalent pipeline method:
0 commit comments