com.mysql.cj.protocol

## Interface ServerSessionStateController

    public interface ServerSessionStateController

### Nested Class Summary

Nested Classes
`static interface` `ServerSessionStateController.ServerSessionStateChanges` The object containing server session changes collected from the latest query execution.
`static class` `ServerSessionStateController.SessionStateChange` A single server session change record.
`static interface` `ServerSessionStateController.SessionStateChangesListener`

### Field Summary

Fields
`static int` `SESSION_TRACK_GTIDS`
`static int` `SESSION_TRACK_SCHEMA`
`static int` `SESSION_TRACK_STATE_CHANGE`
`static int` `SESSION_TRACK_SYSTEM_VARIABLES`
`static int` `SESSION_TRACK_TRANSACTION_CHARACTERISTICS`
`static int` `SESSION_TRACK_TRANSACTION_STATE`

### Method Summary

All Methods Instance Methods Default Methods
`default void` `addSessionStateChangesListener(ServerSessionStateController.SessionStateChangesListener l)` Add the `ServerSessionStateController.SessionStateChangesListener` that will process `ServerSessionStateController.ServerSessionStateChanges` on it's arrival.
`default ServerSessionStateController.ServerSessionStateChanges` `getSessionStateChanges()` Get the object containing server session changes collected from the latest query execution.
`default void` `removeSessionStateChangesListener(ServerSessionStateController.SessionStateChangesListener l)` Remove `ServerSessionStateController.SessionStateChangesListener`.
`default void` `setSessionStateChanges(ServerSessionStateController.ServerSessionStateChanges changes)` Set the object containing server session changes collected from the latest query execution.

### Field Detail

#### SESSION_TRACK_SYSTEM_VARIABLES

    static final int SESSION_TRACK_SYSTEM_VARIABLES

See Also:
  Constant Field Values

#### SESSION_TRACK_SCHEMA

    static final int SESSION_TRACK_SCHEMA

See Also:
  Constant Field Values

#### SESSION_TRACK_STATE_CHANGE

    static final int SESSION_TRACK_STATE_CHANGE

See Also:
  Constant Field Values

#### SESSION_TRACK_GTIDS

    static final int SESSION_TRACK_GTIDS

See Also:
  Constant Field Values

#### SESSION_TRACK_TRANSACTION_CHARACTERISTICS

    static final int SESSION_TRACK_TRANSACTION_CHARACTERISTICS

See Also:
  Constant Field Values

#### SESSION_TRACK_TRANSACTION_STATE

    static final int SESSION_TRACK_TRANSACTION_STATE

See Also:
  Constant Field Values

### Method Detail

#### setSessionStateChanges

    default void setSessionStateChanges(ServerSessionStateController.ServerSessionStateChanges changes)

Set the object containing server session changes collected from the latest query execution. Used internally.

Parameters:
  `changes` - `ServerSessionStateController.ServerSessionStateChanges` object.

#### getSessionStateChanges

    default ServerSessionStateController.ServerSessionStateChanges getSessionStateChanges()

Get the object containing server session changes collected from the latest query execution.

Please note that the driver could issue some queries internally. With that there is no guarantee that all session changes are reflected in the `ServerSessionStateController.ServerSessionStateChanges` object after the recent user's query. If this is an issue, a `ServerSessionStateController.SessionStateChangesListener` can be added via `addSessionStateChangesListener(SessionStateChangesListener)` to catch all session changes.

Returns:
  `ServerSessionStateController.ServerSessionStateChanges` object.

#### addSessionStateChangesListener

    default void addSessionStateChangesListener(ServerSessionStateController.SessionStateChangesListener l)

Add the `ServerSessionStateController.SessionStateChangesListener` that will process `ServerSessionStateController.ServerSessionStateChanges` on it's arrival.

Parameters:
  `l` - `ServerSessionStateController.SessionStateChangesListener` object.

#### removeSessionStateChangesListener

    default void removeSessionStateChangesListener(ServerSessionStateController.SessionStateChangesListener l)

Remove `ServerSessionStateController.SessionStateChangesListener`.

Parameters:
  `l` - `ServerSessionStateController.SessionStateChangesListener` object.

Copyright © 2016, 2024, Oracle and/or its affiliates.