Class JdbcResponse
- java.lang.Object
-
- org.apache.ignite.internal.processors.odbc.ClientListenerResponse
-
- org.apache.ignite.internal.processors.odbc.jdbc.JdbcResponse
-
- All Implemented Interfaces:
JdbcRawBinarylizable
public class JdbcResponse extends ClientListenerResponse implements JdbcRawBinarylizable
SQL listener response.
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.odbc.ClientListenerResponse
STATUS_FAILED, STATUS_SUCCESS
-
-
Constructor Summary
Constructors Constructor Description JdbcResponse()Default constructs is used for deserializationJdbcResponse(int status, @Nullable String err)Constructs failed rest response.JdbcResponse(JdbcResult res)Constructs successful rest response.JdbcResponse(JdbcResult res, @Nullable AffinityTopologyVersion affinityVer)Constructs successful rest response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AffinityTopologyVersionaffinityVersion()voidreadBinary(BinaryReaderExImpl reader, JdbcProtocolContext protoCtx)Reads fields from provided reader.JdbcResultresponse()StringtoString()voidwriteBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx)Writes fields to provided writer.
-
-
-
Constructor Detail
-
JdbcResponse
public JdbcResponse()
Default constructs is used for deserialization
-
JdbcResponse
public JdbcResponse(JdbcResult res)
Constructs successful rest response.- Parameters:
res- Response result.
-
JdbcResponse
public JdbcResponse(JdbcResult res, @Nullable @Nullable AffinityTopologyVersion affinityVer)
Constructs successful rest response.- Parameters:
res- Response result.
-
JdbcResponse
public JdbcResponse(int status, @Nullable @Nullable String err)Constructs failed rest response.- Parameters:
status- Response status.err- Error,nullif success istrue.
-
-
Method Detail
-
response
public JdbcResult response()
- Returns:
- Response object.
-
affinityVersion
public AffinityTopologyVersion affinityVersion()
- Returns:
- Version.
-
writeBinary
public void writeBinary(BinaryWriterExImpl writer, JdbcProtocolContext protoCtx) throws BinaryObjectException
Writes fields to provided writer.- Specified by:
writeBinaryin interfaceJdbcRawBinarylizable- Parameters:
writer- Binary object writer.protoCtx- JDBC protocol context.- Throws:
BinaryObjectException- In case of error.
-
readBinary
public void readBinary(BinaryReaderExImpl reader, JdbcProtocolContext protoCtx) throws BinaryObjectException
Reads fields from provided reader.- Specified by:
readBinaryin interfaceJdbcRawBinarylizable- Parameters:
reader- Binary object reader.protoCtx- JDBC protocol context.- Throws:
BinaryObjectException- In case of error.
-
-