public interface XdrStreamAccess
XdrInputStream and XdrOutputStream.| Modifier and Type | Method and Description |
|---|---|
XdrInputStream |
getXdrIn()
Gets the XDR input stream.
|
XdrOutputStream |
getXdrOut()
Gets the XDR output stream.
|
void |
withTransmitLock(TransmitAction transmitAction)
Runs
TransmitAction.transmit(XdrOutputStream) with getXdrOut() on transmitAction under
the transmit lock. |
XdrInputStream getXdrIn() throws java.sql.SQLException
XdrInputStreamjava.sql.SQLException - if no connection is opened or when exceptions occur retrieving the InputStreamXdrOutputStream getXdrOut() throws java.sql.SQLException
XdrOutputStreamjava.sql.SQLException - if no connection is opened or when exceptions occur retrieving the OutputStreamwithTransmitLock(TransmitAction)void withTransmitLock(TransmitAction transmitAction) throws java.io.IOException, java.sql.SQLException
TransmitAction.transmit(XdrOutputStream) with getXdrOut() on transmitAction under
the transmit lock.
For Jaybird 5 and 6, the transmit lock only needs to be used for statement operations and cancellation. See also jdp-2026-02: Cancellation thread-safety backport
The transmit lock should only cover sending messages to the server. It should be held for the duration of the entire message. It must be released before reading (receiving) messages from the server. If possible, do not do anything other than writing to the XDR output stream while holding the lock.
Normal operations must obtain the lock while holding the connection lock (i.e. the various
withLock() methods). Out-of-band operations (e.g. cancellation) must not take out the
connection lock, otherwise they can't be out-of-band.
Note for implementations: the lock used must be reentrant.
transmitAction - the transmit action to run under lockjava.io.IOException - for errors writing to the XDR output streamjava.sql.SQLException - for other database access errorsTransmitActionCopyright © 2001-2026 Jaybird (Firebird JDBC) team. All rights reserved.