Package org.pjdbc.annotations
Annotation Interface DriverSideEffects
Declares the side effects of a PJDBC proxy driver.
Side effects help AI agents and tooling understand what a driver does beyond its primary function, enabling better decision-making about driver selection and composition.
Example usage:
@DriverCapability(prefix = "redis", description = "Redis-backed query caching")
@DriverSideEffects(network = true, stateful = true)
public class RedisCachingDriver extends AbstractProxyDriver {
// ...
}
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether the driver accesses the filesystem.booleanWhether the driver performs logging operations.booleanWhether the driver emits metrics.booleanWhether the driver can modify queries.booleanWhether the driver can modify results.booleanWhether the driver makes network calls beyond the database connection.booleanWhether the driver maintains internal state across operations.booleanWhether the driver performs tracing.
-
Element Details
-
stateful
boolean statefulWhether the driver maintains internal state across operations. Stateful drivers (like caching, pooling, circuit breakers) retain information between calls that affects behavior.- Returns:
- true if the driver maintains state
- Default:
false
-
logging
boolean loggingWhether the driver performs logging operations. This includes writing to java.util.logging, SLF4J, or any other logging framework.- Returns:
- true if the driver logs
- Default:
false
-
network
boolean networkWhether the driver makes network calls beyond the database connection. This includes connections to Redis, Memcached, Hazelcast, or external tracing/metrics systems.- Returns:
- true if the driver makes additional network calls
- Default:
false
-
filesystem
boolean filesystemWhether the driver accesses the filesystem. This includes reading configuration files, writing logs to files, or any other filesystem I/O.- Returns:
- true if the driver accesses the filesystem
- Default:
false
-
metrics
boolean metricsWhether the driver emits metrics. This includes exposing JMX beans, publishing to Prometheus, or any other metrics collection.- Returns:
- true if the driver emits metrics
- Default:
false
-
tracing
boolean tracingWhether the driver performs tracing. This includes creating spans for distributed tracing systems like OpenTelemetry or Jaeger.- Returns:
- true if the driver performs tracing
- Default:
false
-
modifiesQueries
boolean modifiesQueriesWhether the driver can modify queries. Drivers that transform SQL or inject additional clauses should set this to true.- Returns:
- true if the driver can modify queries
- Default:
false
-
modifiesResults
boolean modifiesResultsWhether the driver can modify results. Drivers that mask data, transform values, or filter rows should set this to true.- Returns:
- true if the driver can modify results
- Default:
false
-