安装包 io.realm.mongodb

枚举 ErrorCode

    • 枚举常量详细信息

      • UNKNOWN

        public static final ErrorCode UNKNOWN
      • NETWORK_IO_EXCEPTION

        public static final ErrorCode NETWORK_IO_EXCEPTION
      • NETWORK_INTERRUPTED

        public static final ErrorCode NETWORK_INTERRUPTED
      • NETWORK_UNKNOWN

        public static final ErrorCode NETWORK_UNKNOWN
      • BSON_CodeC_NOT_FOUND

        public static final ErrorCode BSON_CODEC_NOT_FOUND
      • BSON_ENCODING

        public static final ErrorCode BSON_ENCODING
      • BSON_DECODING

        public static final ErrorCode BSON_DECODING
      • EVENT_DESERIALIZING

        public static final ErrorCode EVENT_DESERIALIZING
      • CLIENT_RESET

        public static final ErrorCode CLIENT_RESET
      • CONNECTION_CLOSED

        public static final ErrorCode CONNECTION_CLOSED
      • OTHER_ERROR

        public static final ErrorCode OTHER_ERROR
      • UNKNOWN_MESSAGE

        public static final ErrorCode UNKNOWN_MESSAGE
      • BAD_SYNTAX

        public static final ErrorCode BAD_SYNTAX
      • LIMITS_EXCEEDED

        public static final ErrorCode LIMITS_EXCEEDED
      • WRONG_PROTOCOL_VERSION

        public static final ErrorCode WRONG_PROTOCOL_VERSION
      • BAD_SESSION_IDENT

        public static final ErrorCode BAD_SESSION_IDENT
      • REUSE_OF_SESSION_IDENT

        public static final ErrorCode REUSE_OF_SESSION_IDENT
      • BOUND_IN_OTHER_SESSION

        public static final ErrorCode BOUND_IN_OTHER_SESSION
      • BAD_MESSAGE_ORDER

        public static final ErrorCode BAD_MESSAGE_ORDER
      • BAD_DECOMPRESSION

        public static final ErrorCode BAD_DECOMPRESSION
      • BAD_CHANGESET_HEADER_SYNTAX

        public static final ErrorCode BAD_CHANGESET_HEADER_SYNTAX
      • BAD_CHANGESET_SIZE

        public static final ErrorCode BAD_CHANGESET_SIZE
      • BAD_CHANGESETS

        public static final ErrorCode BAD_CHANGESETS
      • SESSION_CLOSED

        public static final ErrorCode SESSION_CLOSED
      • OTHER_SESSION_ERROR

        public static final ErrorCode OTHER_SESSION_ERROR
      • TOKEN_EXPIRED

        public static final ErrorCode TOKEN_EXPIRED
      • BAD_AUTHENTICATION

        public static final ErrorCode BAD_AUTHENTICATION
      • ILLEGAL_REALM_PATH

        public static final ErrorCode ILLEGAL_REALM_PATH
      • NO_SUCH_PATH

        public static final ErrorCode NO_SUCH_PATH
      • PERMISSION_DENIED

        public static final ErrorCode PERMISSION_DENIED
      • BAD_SERVER_FILE_IDENT

        public static final ErrorCode BAD_SERVER_FILE_IDENT
      • BAD_CLIENT_FILE_IDENT

        public static final ErrorCode BAD_CLIENT_FILE_IDENT
      • BAD_SERVER_VERSION

        public static final ErrorCode BAD_SERVER_VERSION
      • BAD_CLIENT_VERSION

        public static final ErrorCode BAD_CLIENT_VERSION
      • DIVERGING_HISTORIES

        public static final ErrorCode DIVERGING_HISTORIES
      • BAD_CHANGESET

        public static final ErrorCode BAD_CHANGESET
      • DISABLED_SESSION

        public static final ErrorCode DISABLED_SESSION
      • PARTIAL_SYNC_DISABLED

        public static final ErrorCode PARTIAL_SYNC_DISABLED
      • UNSUPPORTED_SESSION_FEATURE

        public static final ErrorCode UNSUPPORTED_SESSION_FEATURE
      • BAD_ORIGIN_FILE_IDENT

        public static final ErrorCode BAD_ORIGIN_FILE_IDENT
      • BAD_CLIENT_FILE

        public static final ErrorCode BAD_CLIENT_FILE
      • SERVER_FILE_DELETED

        public static final ErrorCode SERVER_FILE_DELETED
      • CLIENT_FILE_BLACKLISTED

        public static final ErrorCode CLIENT_FILE_BLACKLISTED
      • USER_BLACKLISTED

        public static final ErrorCode USER_BLACKLISTED
      • TRANSACT_BEFORE_UPLOAD

        public static final ErrorCode TRANSACT_BEFORE_UPLOAD
      • CLIENT_FILE_EXPIRED

        public static final ErrorCode CLIENT_FILE_EXPIRED
      • USER_MISMATCH

        public static final ErrorCode USER_MISMATCH
      • TOO_MANY_SESSIONS

        public static final ErrorCode TOO_MANY_SESSIONS
      • INVALID_SCHEMA_CHANGE

        public static final ErrorCode INVALID_SCHEMA_CHANGE
      • BAD_QUERY

        public static final ErrorCode BAD_QUERY
      • OBJECT_ALREADY_EXISTS

        public static final ErrorCode OBJECT_ALREADY_EXISTS
      • SERVER_PERMISSIONS_CHANGED

        public static final ErrorCode SERVER_PERMISSIONS_CHANGED
      • INITIAL_SYNC_NOT_COMPLETE

        public static final ErrorCode INITIAL_SYNC_NOT_COMPLETE
      • WRITE_NOT_ALLOWED

        public static final ErrorCode WRITE_NOT_ALLOWED
      • CLIENT_CONNECTION_CLOSED

        public static final ErrorCode CLIENT_CONNECTION_CLOSED
      • CLIENT_UNKNOWN_MESSAGE

        public static final ErrorCode CLIENT_UNKNOWN_MESSAGE
      • CLIENT_LIMITS_EXCEEDED

        public static final ErrorCode CLIENT_LIMITS_EXCEEDED
      • CLIENT_BAD_SESSION_IDENT

        public static final ErrorCode CLIENT_BAD_SESSION_IDENT
      • CLIENT_BAD_MESSAGE_ORDER

        public static final ErrorCode CLIENT_BAD_MESSAGE_ORDER
      • CLIENT_BAD_CLIENT_FILE_IDENT

        public static final ErrorCode CLIENT_BAD_CLIENT_FILE_IDENT
      • CLIENT_BAD_PROGRESS

        public static final ErrorCode CLIENT_BAD_PROGRESS
      • CLIENT_BAD_CHANGESET_HEADER_SYNTAX

        public static final ErrorCode CLIENT_BAD_CHANGESET_HEADER_SYNTAX
      • CLIENT_BAD_CHANGESET_SIZE

        public static final ErrorCode CLIENT_BAD_CHANGESET_SIZE
      • CLIENT_BAD_ORIGIN_FILE_IDENT

        public static final ErrorCode CLIENT_BAD_ORIGIN_FILE_IDENT
      • CLIENT_BAD_SERVER_VERSION

        public static final ErrorCode CLIENT_BAD_SERVER_VERSION
      • CLIENT_BAD_CHANGESET

        public static final ErrorCode CLIENT_BAD_CHANGESET
      • CLIENT_BAD_REQUEST_IDENT

        public static final ErrorCode CLIENT_BAD_REQUEST_IDENT
      • CLIENT_BAD_ERROR_Code

        public static final ErrorCode CLIENT_BAD_ERROR_CODE
      • CLIENT_BAD_COMPRESSION

        public static final ErrorCode CLIENT_BAD_COMPRESSION
      • CLIENT_BAD_CLIENT_VERSION_DOWNLOAD

        public static final ErrorCode CLIENT_BAD_CLIENT_VERSION_DOWNLOAD
      • CLIENT_SSL_SERVER_CERT_REJECTED

        public static final ErrorCode CLIENT_SSL_SERVER_CERT_REJECTED
      • CLIENT_PONG_TIMEOUT

        public static final ErrorCode CLIENT_PONG_TIMEOUT
      • CLIENT_BAD_CLIENT_FILE_IDENT_SALT

        public static final ErrorCode CLIENT_BAD_CLIENT_FILE_IDENT_SALT
      • CLIENT_FILE_IDENT

        public static final ErrorCode CLIENT_FILE_IDENT
      • CLIENT_CONNECT_TIMEOUT

        public static final ErrorCode CLIENT_CONNECT_TIMEOUT
      • CLIENT_BAD_TIMESTAMP

        public static final ErrorCode CLIENT_BAD_TIMESTAMP
      • CLIENT_BAD_PROTOCOL_FROM_SERVER

        public static final ErrorCode CLIENT_BAD_PROTOCOL_FROM_SERVER
      • CLIENT_TOO_OLD_FOR_SERVER

        public static final ErrorCode CLIENT_TOO_OLD_FOR_SERVER
      • CLIENT_TOO_NEW_FOR_SERVER

        public static final ErrorCode CLIENT_TOO_NEW_FOR_SERVER
      • CLIENT_PROTOCOL_MISMATCH

        public static final ErrorCode CLIENT_PROTOCOL_MISMATCH
      • CLIENT_BAD_STATE_MESSAGE

        public static final ErrorCode CLIENT_BAD_STATE_MESSAGE
      • CLIENT_MISSING_PROTOCOL_FEATURE

        public static final ErrorCode CLIENT_MISSING_PROTOCOL_FEATURE
      • CLIENT_BAD_SERIAL_TRANSACT_STATUS

        public static final ErrorCode CLIENT_BAD_SERIAL_TRANSACT_STATUS
      • CLIENT_BAD_OBJECT_ID_SUBSTITUTIONS

        public static final ErrorCode CLIENT_BAD_OBJECT_ID_SUBSTITUTIONS
      • CLIENT_HTTP_TUNNEL_FAILED

        public static final ErrorCode CLIENT_HTTP_TUNNEL_FAILED
      • AUTO_CLIENT_RESET_FAILURE

        public static final ErrorCode AUTO_CLIENT_RESET_FAILURE
      • MULTIPLE_CHOICES

        public static final ErrorCode MULTIPLE_CHOICES
      • MOVED_PERMANENTLY

        public static final ErrorCode MOVED_PERMANENTLY
      • SEE_OTHER

        public static final ErrorCode SEE_OTHER
      • NOT_MODIFIED

        public static final ErrorCode NOT_MODIFIED
      • USE_PROXY

        public static final ErrorCode USE_PROXY
      • TEMPORARY_REDIRECT

        public static final ErrorCode TEMPORARY_REDIRECT
      • PERMANENT_REDIRECT

        public static final ErrorCode PERMANENT_REDIRECT
      • HTTP_BAD_REQUEST

        public static final ErrorCode HTTP_BAD_REQUEST
      • Unauthorized

        public static final ErrorCode UNAUTHORIZED
      • PAYMENT_REQUIRED

        public static final ErrorCode PAYMENT_REQUIRED
      • 禁止

        public static final ErrorCode FORBIDDEN
      • NOT_FOUND

        public static final ErrorCode NOT_FOUND
      • METHOD_NOT_ALLOWED

        public static final ErrorCode METHOD_NOT_ALLOWED
      • NOT_ACCEPTABLE

        public static final ErrorCode NOT_ACCEPTABLE
      • PROXY_AUTHENTICATION_REQUIRED

        public static final ErrorCode PROXY_AUTHENTICATION_REQUIRED
      • REQUEST_TIMEOUT

        public static final ErrorCode REQUEST_TIMEOUT
      • 冲突

        public static final ErrorCode CONFLICT
      • LENGTH_REQUIRED

        public static final ErrorCode LENGTH_REQUIRED
      • PRECONDITION_FAILED

        public static final ErrorCode PRECONDITION_FAILED
      • PAYLOAD_TOO_LARGE

        public static final ErrorCode PAYLOAD_TOO_LARGE
      • URI_TOO_LONG

        public static final ErrorCode URI_TOO_LONG
      • UNSUPPORTED_MEDIA_TYPE

        public static final ErrorCode UNSUPPORTED_MEDIA_TYPE
      • RANGE_NOT_SATISFIABLE

        public static final ErrorCode RANGE_NOT_SATISFIABLE
      • EXPECTATION_FAILED

        public static final ErrorCode EXPECTATION_FAILED
      • MISDIRECTED_REQUEST

        public static final ErrorCode MISDIRECTED_REQUEST
      • UNPROCESSABLE_ENTITY

        public static final ErrorCode UNPROCESSABLE_ENTITY
      • LOCKED

        public static final ErrorCode LOCKED
      • FAILED_DEPENDENCY

        public static final ErrorCode FAILED_DEPENDENCY
      • UPGRADE_REQUIRED

        public static final ErrorCode UPGRADE_REQUIRED
      • PRECONDITION_REQUIRED

        public static final ErrorCode PRECONDITION_REQUIRED
      • TOO_MANY_REQUESTS

        public static final ErrorCode TOO_MANY_REQUESTS
      • REQUEST_HEADER_FIELDS_TOO_LARGE

        public static final ErrorCode REQUEST_HEADER_FIELDS_TOO_LARGE
      • UNAVAILABLE_FOR_LEGAL_REASONS

        public static final ErrorCode UNAVAILABLE_FOR_LEGAL_REASONS
      • INTERNAL_SERVER_ERROR

        public static final ErrorCode INTERNAL_SERVER_ERROR
      • NOT_IMPLMENTED

        public static final ErrorCode NOT_IMPLEMENTED
      • BAD_GATEWAY

        public static final ErrorCode BAD_GATEWAY
      • SERVICE_UNAVAILABLE

        public static final ErrorCode SERVICE_UNAVAILABLE
      • GATEWAY_TIMEOUT

        public static final ErrorCode GATEWAY_TIMEOUT
      • HTTP_VERSION_NOT_SUPPORTED

        public static final ErrorCode HTTP_VERSION_NOT_SUPPORTED
      • VARIANT_ALSO_NEGOTIATES

        public static final ErrorCode VARIANT_ALSO_NEGOTIATES
      • INSUFFICIENT_STORAGE

        public static final ErrorCode INSUFFICIENT_STORAGE
      • LOOP_DETECTED

        public static final ErrorCode LOOP_DETECTED
      • NOT_EXTENDED

        public static final ErrorCode NOT_EXTENDED
      • NETWORK_AUTHENTICATION_REQUIRED

        public static final ErrorCode NETWORK_AUTHENTICATION_REQUIRED
      • INVALID_SESSION

        public static final ErrorCode INVALID_SESSION
      • USER_APP_DOMAIN_MISMATCH

        public static final ErrorCode USER_APP_DOMAIN_MISMATCH
      • DOMAIN_NOT_ALLOWED

        public static final ErrorCode DOMAIN_NOT_ALLOWED
      • READ_SIZE_LIMIT_EXCEEDED

        public static final ErrorCode READ_SIZE_LIMIT_EXCEEDED
      • INVALID_PARAMETER

        public static final ErrorCode INVALID_PARAMETER
      • MISSING_PARAMETER

        public static final ErrorCode MISSING_PARAMETER
      • TWILIO_ERROR

        public static final ErrorCode TWILIO_ERROR
      • GCM_ERROR

        public static final ErrorCode GCM_ERROR
      • HTTP_ERROR

        public static final ErrorCode HTTP_ERROR
      • AWS_ERROR

        public static final ErrorCode AWS_ERROR
      • MONGODB_ERROR

        public static final ErrorCode MONGODB_ERROR
      • ARGUMENTS_NOT_ALLOWED

        public static final ErrorCode ARGUMENTS_NOT_ALLOWED
      • FUNCTION_EXECUTION_ERROR

        public static final ErrorCode FUNCTION_EXECUTION_ERROR
      • NO_MATCHING_RULE_FOUND

        public static final ErrorCode NO_MATCHING_RULE_FOUND
      • SERVICE_INTERNAL_SERVER_ERROR

        public static final ErrorCode SERVICE_INTERNAL_SERVER_ERROR
      • AUTH_PROVIDER_NOT_FOUND

        public static final ErrorCode AUTH_PROVIDER_NOT_FOUND
      • AUTH_PROVIDER_ALREADY_EXISTS

        public static final ErrorCode AUTH_PROVIDER_ALREADY_EXISTS
      • SERVICE_NOT_FOUND

        public static final ErrorCode SERVICE_NOT_FOUND
      • SERVICE_TYPE_NOT_FOUND

        public static final ErrorCode SERVICE_TYPE_NOT_FOUND
      • SERVICE_ALREADY_EXISTS

        public static final ErrorCode SERVICE_ALREADY_EXISTS
      • SERVICE_COMMAND_NOT_FOUND

        public static final ErrorCode SERVICE_COMMAND_NOT_FOUND
      • VALUE_NOT_FOUND

        public static final ErrorCode VALUE_NOT_FOUND
      • VALUE_ALREADY_EXISTS

        public static final ErrorCode VALUE_ALREADY_EXISTS
      • VALUE_DUPLICATE_NAME

        public static final ErrorCode VALUE_DUPLICATE_NAME
      • FUNCTION_NOT_FOUND

        public static final ErrorCode FUNCTION_NOT_FOUND
      • FUNCTION_ALREADY_EXISTS

        public static final ErrorCode FUNCTION_ALREADY_EXISTS
      • FUNCTION_DUPLICATE_NAME

        public static final ErrorCode FUNCTION_DUPLICATE_NAME
      • FUNCTION_SYNTAX_ERROR

        public static final ErrorCode FUNCTION_SYNTAX_ERROR
      • FUNCTION_INVALID

        public static final ErrorCode FUNCTION_INVALID
      • INCOMING_WEBHOOK_NOT_FOUND

        public static final ErrorCode INCOMING_WEBHOOK_NOT_FOUND
      • INCOMING_WEBHOOK_ALREADY_EXISTS

        public static final ErrorCode INCOMING_WEBHOOK_ALREADY_EXISTS
      • INCOMING_WEBHOOK_DUPLICATE_NAME

        public static final ErrorCode INCOMING_WEBHOOK_DUPLICATE_NAME
      • RULE_NOT_FOUND

        public static final ErrorCode RULE_NOT_FOUND
      • API_KEY_NOT_FOUND

        public static final ErrorCode API_KEY_NOT_FOUND
      • RULE_ALREADY_EXISTS

        public static final ErrorCode RULE_ALREADY_EXISTS
      • RULE_DUPLICATE_NAME

        public static final ErrorCode RULE_DUPLICATE_NAME
      • AUTH_PROVIDER_DUPLICATE_NAME

        public static final ErrorCode AUTH_PROVIDER_DUPLICATE_NAME
      • RESTRICTED_HOST

        public static final ErrorCode RESTRICTED_HOST
      • API_KEY_ALREADY_EXISTS

        public static final ErrorCode API_KEY_ALREADY_EXISTS
      • INCOMING_WEBHOOK_AUTH_FAILED

        public static final ErrorCode INCOMING_WEBHOOK_AUTH_FAILED
      • EXECUTION_TIME_LIMIT_EXCEEDED

        public static final ErrorCode EXECUTION_TIME_LIMIT_EXCEEDED
      • NOT_CALLABLE

        public static final ErrorCode NOT_CALLABLE
      • USER_ALREADY_CONFIRMED

        public static final ErrorCode USER_ALREADY_CONFIRMED
      • USER_NOT_FOUND

        public static final ErrorCode USER_NOT_FOUND
      • USER_DISABLED

        public static final ErrorCode USER_DISABLED
      • AUTH_ERROR

        public static final ErrorCode AUTH_ERROR
      • BAD_REQUEST

        public static final ErrorCode BAD_REQUEST
      • ACCOUNT_NAME_IN_USE

        public static final ErrorCode ACCOUNT_NAME_IN_USE
      • INVALID_EMAIL_PASSWORD

        public static final ErrorCode INVALID_EMAIL_PASSWORD
      • SERVICE_UNKNOWN

        public static final ErrorCode SERVICE_UNKNOWN
      • SERVICE_NONE

        public static final ErrorCode SERVICE_NONE
      • CONNECTION_RESET_BY_PEER

        public static final ErrorCode CONNECTION_RESET_BY_PEER
      • CONNECTION_SOCKET_SHUTDOWN

        public static final ErrorCode CONNECTION_SOCKET_SHUTDOWN
      • CONNECTION_REFUSED

        public static final ErrorCode CONNECTION_REFUSED
      • CONNECTION_ADDRESS_IN_USE

        public static final ErrorCode CONNECTION_ADDRESS_IN_USE
      • CONNECTION_CONNECTION_ABORTED

        public static final ErrorCode CONNECTION_CONNECTION_ABORTED
      • MISC_END_OF_INPUT

        public static final ErrorCode MISC_END_OF_INPUT
      • MISC_PREMATURE_END_OF_INPUT

        public static final ErrorCode MISC_PREMATURE_END_OF_INPUT
      • MISC_DELIMITER_NOT_FOUND

        public static final ErrorCode MISC_DELIMITER_NOT_FOUND
    • 方法详细信息

      • values

        public static ErrorCode[] values()
        按声明顺序返回包含此枚举类型常量的数组。 此方法可用于迭代常量,如下所示:
        for (ErrorCode c : ErrorCode.values())   System.out.println(c);
        
        返回:
        包含此枚举类型常量的数组,按声明顺序排列
      • 的值

        public static ErrorCode valueOf​(String name)
        返回具有指定名称的该类型的枚举常量。 该字符串必须与用于声明此类型的枚举常量的标识符完全匹配。 (不允许使用多余的空白字符。)
        参数:
        name - 要返回的枚举常量的名称。
        返回:
        具有指定名称的枚举常量
        抛出异常:
        IllegalArgumentException - 如果此枚举类型没有指定名称的常量
        NullPointerException - 如果参数为 null
      • intValue

        public int intValue()
        返回此错误代码的数值。 请注意,错误仅由(type:value)对唯一标识。
        返回:
        错误代码作为唯一的int值。
      • getCategory

        public ErrorCode.Category getCategory()
        返回错误的 getCategory。

        错误分为 2 类:FATAL、RECOVERABLE

        FATAL:会话无法恢复,需要重新创建。 可能的原因是用户无权访问此 Realm。 检查SyncConfiguration是否正确。

        RECOVERABLE:临时错误。 会话将自动尝试尽快恢复。

        返回:
        错误的严重性。
      • getType

        public String getType()
        返回错误类型。 请注意,错误仅由(type:value)对唯一标识。
        返回:
        错误类型。
      • fromNativeError

        public static ErrorCode fromNativeError​(String type,
                                                int errorCode)
        将本机错误转换为相应的 Java 等效错误
        参数:
        type — 错误类型。 这通常是 C++ 类别。
        errorCode - 类型中的特定代码
        返回:
        代表本机错误的 Java 错误。 This method will never throw, so in case a Java error does not exists. 将返回UNKNOWN