Annotation Interface DriverSideEffects


@Documented @Retention(RUNTIME) @Target(TYPE) public @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 Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether the driver accesses the filesystem.
    boolean
    Whether the driver performs logging operations.
    boolean
    Whether the driver emits metrics.
    boolean
    Whether the driver can modify queries.
    boolean
    Whether the driver can modify results.
    boolean
    Whether the driver makes network calls beyond the database connection.
    boolean
    Whether the driver maintains internal state across operations.
    boolean
    Whether the driver performs tracing.
  • Element Details

    • stateful

      boolean stateful
      Whether 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 logging
      Whether 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 network
      Whether 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 filesystem
      Whether 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 metrics
      Whether 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 tracing
      Whether 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 modifiesQueries
      Whether 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 modifiesResults
      Whether 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