Interface XdrStreamAccess

    • Method Detail

      • getXdrIn

        XdrInputStream getXdrIn()
                         throws java.sql.SQLException
        Gets the XDR input stream.
        Returns:
        instance of XdrInputStream
        Throws:
        java.sql.SQLException - if no connection is opened or when exceptions occur retrieving the InputStream
      • withTransmitLock

        void withTransmitLock​(TransmitAction transmitAction)
                       throws java.io.IOException,
                              java.sql.SQLException
        Runs 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.

        Parameters:
        transmitAction - the transmit action to run under lock
        Throws:
        java.io.IOException - for errors writing to the XDR output stream
        java.sql.SQLException - for other database access errors
        Since:
        5.0.11
        See Also:
        TransmitAction