Class BulkLoadAckClientParameters
- java.lang.Object
-
- org.apache.ignite.internal.processors.bulkload.BulkLoadAckClientParameters
-
public class BulkLoadAckClientParameters extends Object
Bulk load parameters, which are parsed from SQL command and sent from server to client.
-
-
Field Summary
Fields Modifier and Type Field Description static intDFLT_PACKET_SIZESize of a file packet size for COPY command.static intMAX_PACKET_SIZEMaximum packet size.static intMIN_PACKET_SIZEMinimum packet size.
-
Constructor Summary
Constructors Constructor Description BulkLoadAckClientParameters(@NotNull String locFileName, int packetSize)Creates a bulk load parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanisValidPacketSize(int sz)Checks if packet size value is valid.@NotNull StringlocalFileName()Returns the local name of file to send.intpacketSize()Returns the packet size.static StringpacketSizeErrorMesssage(int size)Creates proper packet size error message ifisValidPacketSize(int)check has failed.
-
-
-
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 ifisValidPacketSize(int)check has failed.- Parameters:
size- The packet size.- Returns:
- The string with the error message.
-
-