Enum ChannelMigrationResponseCode
- java.lang.Object
-
- java.lang.Enum<ChannelMigrationResponseCode>
-
- com.snowflake.kafka.connector.internal.streaming.ChannelMigrationResponseCode
-
- All Implemented Interfaces:
Serializable,Comparable<ChannelMigrationResponseCode>
public enum ChannelMigrationResponseCode extends Enum<ChannelMigrationResponseCode>
Response code sent from the system function to migrate offsets from Source to Destination Channel. Please keep this code(values) in sync with what the server side is assigned.
-
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description static StringUNKNOWN_STATUS_MESSAGE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()static StringgetMessageByCode(Long statusCode)longgetStatusCode()static booleanisChannelMigrationResponseSuccessful(ChannelMigrateOffsetTokenResponseDTO channelMigrateOffsetTokenResponseDTO)Given a Response DTO, which was received from server side and serialized, check if it as successful migration or a failure.static ChannelMigrationResponseCodevalueOf(String name)Returns the enum constant of this type with the specified name.static ChannelMigrationResponseCode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ERR_TABLE_DOES_NOT_EXIST_NOT_AUTHORIZED
public static final ChannelMigrationResponseCode ERR_TABLE_DOES_NOT_EXIST_NOT_AUTHORIZED
-
SUCCESS
public static final ChannelMigrationResponseCode SUCCESS
-
OFFSET_MIGRATION_SOURCE_CHANNEL_DOES_NOT_EXIST
public static final ChannelMigrationResponseCode OFFSET_MIGRATION_SOURCE_CHANNEL_DOES_NOT_EXIST
-
CHANNEL_OFFSET_TOKEN_MIGRATION_GENERAL_EXCEPTION
public static final ChannelMigrationResponseCode CHANNEL_OFFSET_TOKEN_MIGRATION_GENERAL_EXCEPTION
-
OFFSET_MIGRATION_SOURCE_AND_DESTINATION_CHANNEL_SAME
public static final ChannelMigrationResponseCode OFFSET_MIGRATION_SOURCE_AND_DESTINATION_CHANNEL_SAME
-
-
Field Detail
-
UNKNOWN_STATUS_MESSAGE
public static final String UNKNOWN_STATUS_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static ChannelMigrationResponseCode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ChannelMigrationResponseCode c : ChannelMigrationResponseCode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChannelMigrationResponseCode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getStatusCode
public long getStatusCode()
-
getMessage
public String getMessage()
-
isChannelMigrationResponseSuccessful
public static boolean isChannelMigrationResponseSuccessful(ChannelMigrateOffsetTokenResponseDTO channelMigrateOffsetTokenResponseDTO)
Given a Response DTO, which was received from server side and serialized, check if it as successful migration or a failure.- Parameters:
channelMigrateOffsetTokenResponseDTO- response from JDBC system function call serialized into a DTO object.- Returns:
- true or false
-
-