Top Inners Fields Methods
com.mysql.cj.protocol

public Interface ServerSessionStateController

Known Direct Implementers
com.mysql.cj.protocol.a.NativeServerSessionStateController
Imports
java.util.ArrayList, .List, com.mysql.cj.exceptions.CJOperationNotSupportedException, .ExceptionFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
ServerSessionStateController.ServerSessionStateChanges

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

public static class
ServerSessionStateController.SessionStateChange

A single server session change record.

public static interface

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Method Summary

Modifier and TypeMethod and Description
public default void
public default ServerSessionStateController.ServerSessionStateChanges

Returns:

ServerSessionStateChanges object.
getSessionStateChanges
()

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

public default void
public default void
setSessionStateChanges(ServerSessionStateController.ServerSessionStateChanges changes)

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

Field Detail

SESSION_TRACK_GTIDSback to summary
public static final int SESSION_TRACK_GTIDS
SESSION_TRACK_SCHEMAback to summary
public static final int SESSION_TRACK_SCHEMA
SESSION_TRACK_STATE_CHANGEback to summary
public static final int SESSION_TRACK_STATE_CHANGE
SESSION_TRACK_SYSTEM_VARIABLESback to summary
public static final int SESSION_TRACK_SYSTEM_VARIABLES
SESSION_TRACK_TRANSACTION_CHARACTERISTICSback to summary
public static final int SESSION_TRACK_TRANSACTION_CHARACTERISTICS
SESSION_TRACK_TRANSACTION_STATEback to summary
public static final int SESSION_TRACK_TRANSACTION_STATE

Method Detail

addSessionStateChangesListenerback to summary
public default void addSessionStateChangesListener(ServerSessionStateController.SessionStateChangesListener l)

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

Parameters
l:ServerSessionStateController.SessionStateChangesListener

SessionStateChangesListener object.

getSessionStateChangesback to summary
public 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 ServerSessionStateChanges object after the recent user's query. If this is an issue, a SessionStateChangesListener can be added via addSessionStateChangesListener(SessionStateChangesListener) to catch all session changes.

Returns:ServerSessionStateController.ServerSessionStateChanges

ServerSessionStateChanges object.

removeSessionStateChangesListenerback to summary
public default void removeSessionStateChangesListener(ServerSessionStateController.SessionStateChangesListener l)

Remove SessionStateChangesListener.

Parameters
l:ServerSessionStateController.SessionStateChangesListener

SessionStateChangesListener object.

setSessionStateChangesback to summary
public 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

ServerSessionStateChanges object.

com.mysql.cj.protocol back to summary

public Interface ServerSessionStateController.ServerSessionStateChanges

Known Direct Implementers
com.mysql.cj.protocol.a.NativeServerSessionStateController.NativeServerSessionStateChanges

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

Driver is getting these changes when connection property trackSessionState=true and server supports session tracking.

Method Summary

Modifier and TypeMethod and Description
public List<ServerSessionStateController.SessionStateChange>

Method Detail

getSessionStateChangesListback to summary
public List<ServerSessionStateController.SessionStateChange> getSessionStateChangesList()
com.mysql.cj.protocol back to summary

public Class ServerSessionStateController.SessionStateChange

extends Object
Class Inheritance
  • java.lang.Object
  • com.mysql.cj.protocol.ServerSessionStateController.SessionStateChange

A single server session change record.

The server messages about session changes are parsed according to their known types:

For the unknown change type the raw payload is written into the single value.

See more details in the server documentation.

Field Summary

Modifier and TypeField and Description
private int
private List<String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ServerSessionStateController.SessionStateChange
public int
public List<String>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

typeback to summary
private int type
valuesback to summary
private List<String> values

Constructor Detail

SessionStateChangeback to summary
public SessionStateChange(int type)

Method Detail

addValueback to summary
public ServerSessionStateController.SessionStateChange addValue(String value)
getTypeback to summary
public int getType()
getValuesback to summary
public List<String> getValues()
com.mysql.cj.protocol back to summary

public Interface ServerSessionStateController.SessionStateChangesListener

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public void

Method Detail

handleSessionStateChangesback to summary
public void handleSessionStateChanges(ServerSessionStateController.ServerSessionStateChanges changes)