public class ExtendedQueryProtocolHandler
Handles the message flow for the extended query protocol. Wire-protocol messages are buffered in memory until a flush/sync is received.
Constructors
ExtendedQueryProtocolHandler(ConnectionHandler connectionHandler)
public ExtendedQueryProtocolHandler(ConnectionHandler connectionHandler)
Creates an ExtendedQueryProtocolHandler for the given connection.
Name | Description |
connectionHandler | ConnectionHandler |
ExtendedQueryProtocolHandler(BackendConnection backendConnection)
public ExtendedQueryProtocolHandler(BackendConnection backendConnection)
Constructor only intended for testing.
Name | Description |
backendConnection | BackendConnection |
Methods
buffer(AbstractQueryProtocolMessage message)
public void buffer(AbstractQueryProtocolMessage message)
Buffer an extended query protocol message for execution when the next flush/sync message is received.
Name | Description |
message | AbstractQueryProtocolMessage |
flush()
public void flush()
Flushes the current queue of messages. Any pending database statements are first executed, before sending the wire-protocol responses to the frontend. A flush does not commit the implicit transaction (if any).
Type | Description |
Exception |
getBackendConnection()
public BackendConnection getBackendConnection()
Returns the backend PG connection for this query handler.
Type | Description |
BackendConnection |
sync()
public void sync()
Flushes the current queue of messages and commits the implicit transaction (if any). Any pending database statements are first executed, before sending the wire-protocol responses to the frontend.
Type | Description |
Exception |