Class BulkLoadAckClientParameters


  • public class BulkLoadAckClientParameters
    extends Object
    Bulk load parameters, which are parsed from SQL command and sent from server to client.
    • Field Detail

      • MIN_PACKET_SIZE

        public static final int MIN_PACKET_SIZE
        Minimum packet size.
        See Also:
        Constant Field Values
      • MAX_PACKET_SIZE

        public static final int MAX_PACKET_SIZE
        Maximum packet size. Note that the packet is wrapped to transport objects and the overall packet should fit into a Java array. 512 has been chosen arbitrarily.
        See Also:
        Constant Field Values
      • DFLT_PACKET_SIZE

        public static final int DFLT_PACKET_SIZE
        Size of a file packet size for COPY command.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BulkLoadAckClientParameters

        public BulkLoadAckClientParameters​(@NotNull
                                           @NotNull String locFileName,
                                           int packetSize)
        Creates a bulk load parameters.
        Parameters:
        locFileName - File name to send from client to server.
        packetSize - Packet size (Number of bytes in a portion of a file to send in one JDBC request/response).
    • Method Detail

      • localFileName

        @NotNull
        public @NotNull String localFileName()
        Returns the local name of file to send.
        Returns:
        The local name of file to send.
      • packetSize

        public int packetSize()
        Returns the packet size.
        Returns:
        The packet size.
      • isValidPacketSize

        public static boolean isValidPacketSize​(int sz)
        Checks if packet size value is valid.
        Parameters:
        sz - The packet size to check.
        Throws:
        IllegalArgumentException - if packet size is invalid.
      • packetSizeErrorMesssage

        public static String packetSizeErrorMesssage​(int size)
        Creates proper packet size error message if isValidPacketSize(int) check has failed.
        Parameters:
        size - The packet size.
        Returns:
        The string with the error message.