pub struct ParallelTransportPool { /* private fields */ }Expand description
Pool of parallel HTTP transport connections for multi-file import.
This struct manages multiple HTTP connections, each performing the EXA tunneling handshake to obtain unique internal addresses for the IMPORT SQL.
Implementations§
Source§impl ParallelTransportPool
impl ParallelTransportPool
Sourcepub async fn connect(
host: &str,
port: u16,
use_tls: bool,
file_count: usize,
) -> Result<Self, ImportError>
pub async fn connect( host: &str, port: u16, use_tls: bool, file_count: usize, ) -> Result<Self, ImportError>
Establishes N parallel HTTP connections with EXA handshake.
This method creates file_count HTTP transport connections in parallel,
each performing the EXA tunneling handshake to obtain unique internal addresses.
§Arguments
host- The Exasol host to connect toport- The port to connect touse_tls- Whether to use TLS encryptionfile_count- Number of parallel connections to establish
§Returns
A ParallelTransportPool with established connections.
§Errors
Returns ImportError::ParallelConnectionError if any connection fails.
Uses fail-fast semantics - aborts all remaining connections on first failure.
Sourcepub fn file_entries(&self) -> &[ImportFileEntry]
pub fn file_entries(&self) -> &[ImportFileEntry]
Returns file entries for SQL query building.
These entries contain the internal addresses and file names needed to construct the multi-FILE IMPORT SQL statement.
Sourcepub fn into_connections(self) -> Vec<HttpTransportClient>
pub fn into_connections(self) -> Vec<HttpTransportClient>
Consumes pool and returns connections for streaming.
This method takes ownership of the pool and returns the individual connections for use in parallel streaming.