neo4j-ruby-driver 1.7.5 → 4.4.0.alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -42
- data/lib/loader.rb +5 -3
- data/lib/neo4j/driver/auto_closable.rb +2 -2
- data/lib/neo4j/driver/exceptions/authentication_exception.rb +6 -1
- data/lib/neo4j/driver/exceptions/authorization_expired_exception.rb +14 -0
- data/lib/neo4j/driver/{types/bytes.rb → exceptions/certificate_exception.rb} +2 -2
- data/lib/neo4j/driver/exceptions/client_exception.rb +3 -0
- data/lib/neo4j/driver/exceptions/connection_read_timeout_exception.rb +14 -0
- data/lib/neo4j/driver/exceptions/database_exception.rb +3 -0
- data/lib/neo4j/driver/exceptions/discovery_exception.rb +16 -0
- data/lib/neo4j/driver/exceptions/fatal_discovery_exception.rb +13 -0
- data/lib/neo4j/driver/exceptions/protocol_exception.rb +7 -0
- data/lib/neo4j/driver/exceptions/result_consumed_exception.rb +13 -0
- data/lib/neo4j/driver/exceptions/security_exception.rb +5 -1
- data/lib/neo4j/driver/exceptions/service_unavailable_exception.rb +2 -0
- data/lib/neo4j/driver/exceptions/session_expired_exception.rb +4 -0
- data/lib/neo4j/driver/exceptions/token_expired_exception.rb +15 -0
- data/lib/neo4j/driver/exceptions/transaction_nesting_exception.rb +11 -0
- data/lib/neo4j/driver/exceptions/transient_exception.rb +3 -0
- data/lib/neo4j/driver/exceptions/untrusted_server_exception.rb +1 -0
- data/lib/neo4j/driver/exceptions/value/lossy_coercion.rb +15 -0
- data/lib/neo4j/driver/exceptions/value/not_multi_valued.rb +13 -0
- data/lib/neo4j/driver/exceptions/value/uncoercible.rb +15 -0
- data/lib/neo4j/driver/exceptions/value/unsizable.rb +12 -0
- data/lib/neo4j/driver/exceptions/value/value_exception.rb +12 -0
- data/lib/neo4j/driver/internal/bolt_server_address.rb +97 -0
- data/lib/neo4j/driver/internal/duration_normalizer.rb +1 -1
- data/lib/neo4j/driver/internal/validator.rb +5 -4
- data/{ffi/neo4j/driver/summary/statement_type.rb → lib/neo4j/driver/summary/query_type.rb} +1 -3
- data/lib/neo4j/driver/synchronizable.rb +23 -0
- data/lib/neo4j_ruby_driver.rb +5 -10
- data/{ffi → ruby}/neo4j/driver/access_mode.rb +2 -2
- data/ruby/neo4j/driver/auth_tokens.rb +34 -0
- data/ruby/neo4j/driver/bookmark.rb +21 -0
- data/ruby/neo4j/driver/config.rb +91 -0
- data/ruby/neo4j/driver/graph_database.rb +140 -0
- data/ruby/neo4j/driver/internal/async/connection/bolt_protocol_util.rb +51 -0
- data/ruby/neo4j/driver/internal/async/connection/bootstrap_factory.rb +22 -0
- data/ruby/neo4j/driver/internal/async/connection/channel_attributes.rb +31 -0
- data/ruby/neo4j/driver/internal/async/connection/channel_connected_listener.rb +32 -0
- data/ruby/neo4j/driver/internal/async/connection/channel_connector_impl.rb +77 -0
- data/ruby/neo4j/driver/internal/async/connection/channel_pipeline_builder_impl.rb +22 -0
- data/ruby/neo4j/driver/internal/async/connection/direct_connection.rb +30 -0
- data/ruby/neo4j/driver/internal/async/connection/event_loop_group_factory.rb +83 -0
- data/ruby/neo4j/driver/internal/async/connection/handshake_completed_listener.rb +27 -0
- data/ruby/neo4j/driver/internal/async/connection/handshake_handler.rb +113 -0
- data/ruby/neo4j/driver/internal/async/connection/netty_channel_initializer.rb +57 -0
- data/ruby/neo4j/driver/internal/async/connection/netty_domain_name_resolver.rb +26 -0
- data/ruby/neo4j/driver/internal/async/connection/netty_domain_name_resolver_group.rb +19 -0
- data/ruby/neo4j/driver/internal/async/connection/routing_connection.rb +36 -0
- data/ruby/neo4j/driver/internal/async/connection/stream.rb +12 -0
- data/ruby/neo4j/driver/internal/async/connection/stream_reader.rb +16 -0
- data/ruby/neo4j/driver/internal/async/connection_context.rb +10 -0
- data/ruby/neo4j/driver/internal/async/immutable_connection_context.rb +24 -0
- data/ruby/neo4j/driver/internal/async/inbound/byte_buf_input.rb +30 -0
- data/ruby/neo4j/driver/internal/async/inbound/channel_error_handler.rb +77 -0
- data/ruby/neo4j/driver/internal/async/inbound/chunk_decoder.rb +41 -0
- data/ruby/neo4j/driver/internal/async/inbound/connect_timeout_handler.rb +32 -0
- data/ruby/neo4j/driver/internal/async/inbound/connection_read_timeout_handler.rb +17 -0
- data/ruby/neo4j/driver/internal/async/inbound/inbound_message_dispatcher.rb +172 -0
- data/ruby/neo4j/driver/internal/async/inbound/inbound_message_handler.rb +42 -0
- data/ruby/neo4j/driver/internal/async/inbound/message_decoder.rb +51 -0
- data/ruby/neo4j/driver/internal/async/internal_async_session.rb +98 -0
- data/ruby/neo4j/driver/internal/async/internal_async_transaction.rb +13 -0
- data/ruby/neo4j/driver/internal/async/leak_logging_network_session.rb +34 -0
- data/ruby/neo4j/driver/internal/async/network_connection.rb +196 -0
- data/ruby/neo4j/driver/internal/async/network_session.rb +152 -0
- data/ruby/neo4j/driver/internal/async/outbound/chunk_aware_byte_buf_output.rb +110 -0
- data/ruby/neo4j/driver/internal/async/outbound/outbound_message_handler.rb +39 -0
- data/ruby/neo4j/driver/internal/async/pool/channel.rb +63 -0
- data/ruby/neo4j/driver/internal/async/pool/connection_pool_impl.rb +149 -0
- data/ruby/neo4j/driver/internal/async/pool/controller.rb +25 -0
- data/ruby/neo4j/driver/internal/async/pool/netty_channel_health_checker.rb +87 -0
- data/ruby/neo4j/driver/internal/async/pool/netty_channel_pool.rb +52 -0
- data/ruby/neo4j/driver/internal/async/pool/netty_channel_tracker.rb +137 -0
- data/ruby/neo4j/driver/internal/async/pool/network_connection_factory.rb +21 -0
- data/ruby/neo4j/driver/internal/async/pool/pool_settings.rb +34 -0
- data/ruby/neo4j/driver/internal/async/result_cursors_holder.rb +17 -0
- data/ruby/neo4j/driver/internal/async/unmanaged_transaction.rb +214 -0
- data/ruby/neo4j/driver/internal/bookmark_holder.rb +9 -0
- data/ruby/neo4j/driver/internal/cluster/cluster_composition.rb +58 -0
- data/ruby/neo4j/driver/internal/cluster/cluster_composition_lookup_result.rb +14 -0
- data/ruby/neo4j/driver/internal/cluster/cluster_routing_table.rb +139 -0
- data/ruby/neo4j/driver/internal/cluster/identity_resolver.rb +13 -0
- data/ruby/neo4j/driver/internal/cluster/loadbalancing/least_connected_load_balancing_strategy.rb +68 -0
- data/ruby/neo4j/driver/internal/cluster/loadbalancing/load_balancer.rb +159 -0
- data/ruby/neo4j/driver/internal/cluster/loadbalancing/round_robin_array_index.rb +13 -0
- data/ruby/neo4j/driver/internal/cluster/multi_databases_routing_procedure_runner.rb +34 -0
- data/ruby/neo4j/driver/internal/cluster/rediscovery_impl.rb +238 -0
- data/ruby/neo4j/driver/internal/cluster/route_message_routing_procedure_runner.rb +43 -0
- data/ruby/neo4j/driver/internal/cluster/routing_context.rb +77 -0
- data/ruby/neo4j/driver/internal/cluster/routing_procedure_cluster_composition_provider.rb +64 -0
- data/ruby/neo4j/driver/internal/cluster/routing_procedure_response.rb +19 -0
- data/ruby/neo4j/driver/internal/cluster/routing_settings.rb +24 -0
- data/ruby/neo4j/driver/internal/cluster/routing_table_handler_impl.rb +116 -0
- data/ruby/neo4j/driver/internal/cluster/routing_table_registry_impl.rb +140 -0
- data/ruby/neo4j/driver/internal/cluster/single_database_routing_procedure_runner.rb +76 -0
- data/ruby/neo4j/driver/internal/connection_settings.rb +16 -0
- data/ruby/neo4j/driver/internal/cursor/async_result_cursor_impl.rb +76 -0
- data/ruby/neo4j/driver/internal/cursor/async_result_cursor_only_factory.rb +29 -0
- data/ruby/neo4j/driver/internal/cursor/disposable_async_result_cursor.rb +59 -0
- data/ruby/neo4j/driver/internal/cursor/result_cursor_factory_impl.rb +29 -0
- data/ruby/neo4j/driver/internal/cursor/rx_result_cursor_impl.rb +110 -0
- data/ruby/neo4j/driver/internal/database_name.rb +12 -0
- data/ruby/neo4j/driver/internal/database_name_util.rb +37 -0
- data/ruby/neo4j/driver/internal/default_bookmark_holder.rb +15 -0
- data/ruby/neo4j/driver/internal/default_domain_name_resolver.rb +11 -0
- data/ruby/neo4j/driver/internal/direct_connection_provider.rb +40 -0
- data/ruby/neo4j/driver/internal/driver_factory.rb +127 -0
- data/ruby/neo4j/driver/internal/handlers/begin_tx_response_handler.rb +20 -0
- data/ruby/neo4j/driver/internal/handlers/channel_releasing_reset_response_handler.rb +29 -0
- data/ruby/neo4j/driver/internal/handlers/commit_tx_response_handler.rb +25 -0
- data/ruby/neo4j/driver/internal/handlers/hello_response_handler.rb +65 -0
- data/ruby/neo4j/driver/internal/handlers/init_response_handler.rb +34 -0
- data/ruby/neo4j/driver/internal/handlers/legacy_pull_all_response_handler.rb +228 -0
- data/ruby/neo4j/driver/internal/handlers/no_op_response_handler.rb +16 -0
- data/ruby/neo4j/driver/internal/handlers/ping_response_handler.rb +29 -0
- data/ruby/neo4j/driver/internal/handlers/pull_handlers.rb +32 -0
- data/ruby/neo4j/driver/internal/handlers/pulln/auto_pull_response_handler.rb +174 -0
- data/ruby/neo4j/driver/internal/handlers/pulln/basic_pull_response_handler.rb +288 -0
- data/ruby/neo4j/driver/internal/handlers/pulln/fetch_size_util.rb +20 -0
- data/ruby/neo4j/driver/internal/handlers/reset_response_handler.rb +34 -0
- data/ruby/neo4j/driver/internal/handlers/rollback_tx_response_handler.rb +19 -0
- data/ruby/neo4j/driver/internal/handlers/route_message_response_handler.rb +21 -0
- data/ruby/neo4j/driver/internal/handlers/routing_response_handler.rb +70 -0
- data/ruby/neo4j/driver/internal/handlers/run_response_handler.rb +37 -0
- data/ruby/neo4j/driver/internal/handlers/session_pull_response_completion_listener.rb +34 -0
- data/ruby/neo4j/driver/internal/handlers/transaction_pull_response_completion_listener.rb +20 -0
- data/ruby/neo4j/driver/internal/impersonation_util.rb +22 -0
- data/ruby/neo4j/driver/internal/internal_bookmark.rb +38 -0
- data/ruby/neo4j/driver/internal/internal_database_name.rb +11 -0
- data/ruby/neo4j/driver/internal/internal_driver.rb +78 -0
- data/ruby/neo4j/driver/internal/internal_entity.rb +22 -0
- data/ruby/neo4j/driver/internal/internal_node.rb +21 -0
- data/ruby/neo4j/driver/internal/internal_pair.rb +9 -0
- data/ruby/neo4j/driver/internal/internal_path.rb +35 -0
- data/ruby/neo4j/driver/internal/internal_point2_d.rb +9 -0
- data/ruby/neo4j/driver/internal/internal_point3_d.rb +6 -0
- data/{ffi → ruby}/neo4j/driver/internal/internal_record.rb +2 -1
- data/ruby/neo4j/driver/internal/internal_relationship.rb +26 -0
- data/ruby/neo4j/driver/internal/internal_result.rb +60 -0
- data/ruby/neo4j/driver/internal/internal_session.rb +81 -0
- data/ruby/neo4j/driver/internal/internal_transaction.rb +48 -0
- data/ruby/neo4j/driver/internal/logging/channel_activity_logger.rb +29 -0
- data/ruby/neo4j/driver/internal/logging/channel_error_logger.rb +17 -0
- data/ruby/neo4j/driver/internal/logging/prefixed_logger.rb +19 -0
- data/ruby/neo4j/driver/internal/logging/reformatted_logger.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/abstract_message_writer.rb +23 -0
- data/ruby/neo4j/driver/internal/messaging/bolt_protocol.rb +30 -0
- data/ruby/neo4j/driver/internal/messaging/bolt_protocol_version.rb +46 -0
- data/ruby/neo4j/driver/internal/messaging/common/common_message_reader.rb +51 -0
- data/ruby/neo4j/driver/internal/messaging/common/common_value.rb +31 -0
- data/ruby/neo4j/driver/internal/messaging/common/common_value_packer.rb +101 -0
- data/ruby/neo4j/driver/internal/messaging/common/common_value_unpacker.rb +234 -0
- data/ruby/neo4j/driver/internal/messaging/encode/begin_message_encoder.rb +15 -0
- data/ruby/neo4j/driver/internal/messaging/encode/commit_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/discard_all_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/discard_message_encoder.rb +15 -0
- data/ruby/neo4j/driver/internal/messaging/encode/goodbye_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/hello_message_encoder.rb +15 -0
- data/ruby/neo4j/driver/internal/messaging/encode/init_message_encoder.rb +16 -0
- data/ruby/neo4j/driver/internal/messaging/encode/pull_all_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/pull_message_encoder.rb +15 -0
- data/ruby/neo4j/driver/internal/messaging/encode/reset_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/rollback_message_encoder.rb +14 -0
- data/ruby/neo4j/driver/internal/messaging/encode/route_message_encoder.rb +18 -0
- data/ruby/neo4j/driver/internal/messaging/encode/route_v44_message_encoder.rb +27 -0
- data/ruby/neo4j/driver/internal/messaging/encode/run_message_encoder.rb +16 -0
- data/ruby/neo4j/driver/internal/messaging/encode/run_with_metadata_message_encoder.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/request/abstract_streaming_message.rb +22 -0
- data/ruby/neo4j/driver/internal/messaging/request/begin_message.rb +26 -0
- data/ruby/neo4j/driver/internal/messaging/request/commit_message.rb +20 -0
- data/ruby/neo4j/driver/internal/messaging/request/discard_all_message.rb +20 -0
- data/ruby/neo4j/driver/internal/messaging/request/discard_message.rb +23 -0
- data/ruby/neo4j/driver/internal/messaging/request/goodbye_message.rb +20 -0
- data/ruby/neo4j/driver/internal/messaging/request/hello_message.rb +31 -0
- data/ruby/neo4j/driver/internal/messaging/request/init_message.rb +19 -0
- data/ruby/neo4j/driver/internal/messaging/request/message_with_metadata.rb +10 -0
- data/ruby/neo4j/driver/internal/messaging/request/multi_database_util.rb +26 -0
- data/ruby/neo4j/driver/internal/messaging/request/pull_all_message.rb +23 -0
- data/ruby/neo4j/driver/internal/messaging/request/pull_message.rb +22 -0
- data/ruby/neo4j/driver/internal/messaging/request/reset_message.rb +32 -0
- data/ruby/neo4j/driver/internal/messaging/request/rollback_message.rb +20 -0
- data/ruby/neo4j/driver/internal/messaging/request/route_message.rb +33 -0
- data/ruby/neo4j/driver/internal/messaging/request/run_message.rb +23 -0
- data/ruby/neo4j/driver/internal/messaging/request/run_with_metadata_message.rb +47 -0
- data/ruby/neo4j/driver/internal/messaging/request/transaction_metadata_builder.rb +24 -0
- data/ruby/neo4j/driver/internal/messaging/response/failure_message.rb +40 -0
- data/ruby/neo4j/driver/internal/messaging/response/ignored_message.rb +29 -0
- data/ruby/neo4j/driver/internal/messaging/response/record_message.rb +33 -0
- data/ruby/neo4j/driver/internal/messaging/response/success_message.rb +34 -0
- data/ruby/neo4j/driver/internal/messaging/v3/bolt_protocol_v3.rb +79 -0
- data/ruby/neo4j/driver/internal/messaging/v3/message_format_v3.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/v3/message_writer_v3.rb +27 -0
- data/ruby/neo4j/driver/internal/messaging/v4/bolt_protocol_v4.rb +29 -0
- data/ruby/neo4j/driver/internal/messaging/v4/message_format_v4.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/v4/message_writer_v4.rb +28 -0
- data/ruby/neo4j/driver/internal/messaging/v41/bolt_protocol_v41.rb +25 -0
- data/ruby/neo4j/driver/internal/messaging/v42/bolt_protocol_v42.rb +13 -0
- data/ruby/neo4j/driver/internal/messaging/v43/bolt_protocol_v43.rb +19 -0
- data/ruby/neo4j/driver/internal/messaging/v43/message_format_v43.rb +18 -0
- data/ruby/neo4j/driver/internal/messaging/v43/message_writer_v43.rb +34 -0
- data/ruby/neo4j/driver/internal/messaging/v44/bolt_protocol_v44.rb +17 -0
- data/ruby/neo4j/driver/internal/messaging/v44/message_format_v44.rb +18 -0
- data/ruby/neo4j/driver/internal/messaging/v44/message_writer_v44.rb +26 -0
- data/ruby/neo4j/driver/internal/metrics/connection_pool_metrics_listener.rb +34 -0
- data/ruby/neo4j/driver/internal/metrics/internal_abstract_metrics.rb +46 -0
- data/ruby/neo4j/driver/internal/metrics/internal_connection_pool_metrics.rb +105 -0
- data/ruby/neo4j/driver/internal/metrics/internal_metrics.rb +82 -0
- data/ruby/neo4j/driver/internal/metrics/internal_metrics_provider.rb +18 -0
- data/ruby/neo4j/driver/internal/metrics/listener_event.rb +17 -0
- data/ruby/neo4j/driver/internal/metrics/metrics_provider.rb +24 -0
- data/ruby/neo4j/driver/internal/metrics/time_recorder_listener_event.rb +15 -0
- data/ruby/neo4j/driver/internal/packstream/byte_array_incompatible_packer.rb +12 -0
- data/ruby/neo4j/driver/internal/packstream/pack_input.rb +47 -0
- data/ruby/neo4j/driver/internal/packstream/pack_output.rb +39 -0
- data/ruby/neo4j/driver/internal/packstream/pack_stream.rb +326 -0
- data/ruby/neo4j/driver/internal/packstream/pack_type.rb +17 -0
- data/ruby/neo4j/driver/internal/retry/exponential_backoff_retry_logic.rb +151 -0
- data/ruby/neo4j/driver/internal/revocation_strategy.rb +19 -0
- data/ruby/neo4j/driver/internal/scheme.rb +32 -0
- data/ruby/neo4j/driver/internal/security/internal_auth_token.rb +15 -0
- data/ruby/neo4j/driver/internal/security/security_plan_impl.rb +92 -0
- data/ruby/neo4j/driver/internal/security_setting.rb +73 -0
- data/ruby/neo4j/driver/internal/session_factory_impl.rb +32 -0
- data/ruby/neo4j/driver/internal/spi/connection.rb +19 -0
- data/ruby/neo4j/driver/internal/spi/connection_pool.rb +9 -0
- data/ruby/neo4j/driver/internal/spi/response_handler.rb +23 -0
- data/ruby/neo4j/driver/internal/summary/internal_database_info.rb +7 -0
- data/ruby/neo4j/driver/internal/summary/internal_input_position.rb +11 -0
- data/ruby/neo4j/driver/internal/summary/internal_notification.rb +16 -0
- data/ruby/neo4j/driver/internal/summary/internal_plan.rb +41 -0
- data/ruby/neo4j/driver/internal/summary/internal_profiled_plan.rb +32 -0
- data/ruby/neo4j/driver/internal/summary/internal_result_summary.rb +33 -0
- data/ruby/neo4j/driver/internal/summary/internal_server_info.rb +6 -0
- data/ruby/neo4j/driver/internal/summary/internal_summary_counters.rb +18 -0
- data/ruby/neo4j/driver/internal/svm/netty_substitutions.rb +196 -0
- data/ruby/neo4j/driver/internal/svm/z_lib_substitutions.rb +21 -0
- data/ruby/neo4j/driver/internal/util/certificate_tool.rb +65 -0
- data/ruby/neo4j/driver/internal/util/clock.rb +29 -0
- data/ruby/neo4j/driver/internal/util/error_util.rb +104 -0
- data/ruby/neo4j/driver/internal/util/extract.rb +123 -0
- data/ruby/neo4j/driver/internal/util/format.rb +39 -0
- data/ruby/neo4j/driver/internal/util/futures.rb +99 -0
- data/ruby/neo4j/driver/internal/util/iterables.rb +35 -0
- data/ruby/neo4j/driver/internal/util/lock_util.rb +23 -0
- data/ruby/neo4j/driver/internal/util/metadata_extractor.rb +109 -0
- data/ruby/neo4j/driver/internal/util/mutex.rb +9 -0
- data/ruby/neo4j/driver/internal/util/preconditions.rb +16 -0
- data/ruby/neo4j/driver/internal/util/server_version.rb +60 -0
- data/ruby/neo4j/driver/logging1.rb +51 -0
- data/ruby/neo4j/driver/net/server_address1.rb +9 -0
- data/ruby/neo4j/driver/query.rb +48 -0
- data/ruby/neo4j/driver/records.rb +13 -0
- data/ruby/neo4j/driver/session_config.rb +15 -0
- data/ruby/neo4j/driver/transaction_config.rb +46 -0
- data/ruby/neo4j/driver/values.rb +26 -0
- data/{lib → ruby}/neo4j/driver/version.rb +1 -1
- data/ruby/neo4j/driver.rb +30 -0
- metadata +267 -92
- data/ffi/bolt/address.rb +0 -11
- data/ffi/bolt/address_resolver.rb +0 -12
- data/ffi/bolt/address_set.rb +0 -9
- data/ffi/bolt/auth.rb +0 -10
- data/ffi/bolt/auto_releasable.rb +0 -22
- data/ffi/bolt/boolean.rb +0 -9
- data/ffi/bolt/bytes.rb +0 -10
- data/ffi/bolt/config.rb +0 -45
- data/ffi/bolt/connection.rb +0 -44
- data/ffi/bolt/connector.rb +0 -17
- data/ffi/bolt/dictionary.rb +0 -15
- data/ffi/bolt/error.rb +0 -74
- data/ffi/bolt/float.rb +0 -9
- data/ffi/bolt/integer.rb +0 -9
- data/ffi/bolt/library.rb +0 -12
- data/ffi/bolt/lifecycle.rb +0 -9
- data/ffi/bolt/list.rb +0 -10
- data/ffi/bolt/log.rb +0 -16
- data/ffi/bolt/socket_options.rb +0 -14
- data/ffi/bolt/status.rb +0 -25
- data/ffi/bolt/string.rb +0 -9
- data/ffi/bolt/structure.rb +0 -10
- data/ffi/bolt/value.rb +0 -35
- data/ffi/neo4j/driver/auth_tokens.rb +0 -18
- data/ffi/neo4j/driver/config.rb +0 -40
- data/ffi/neo4j/driver/graph_database.rb +0 -52
- data/ffi/neo4j/driver/internal/async/access_mode_connection.rb +0 -19
- data/ffi/neo4j/driver/internal/async/direct_connection.rb +0 -106
- data/ffi/neo4j/driver/internal/bolt_server_address.rb +0 -18
- data/ffi/neo4j/driver/internal/bookmarks_holder.rb +0 -30
- data/ffi/neo4j/driver/internal/direct_connection_provider.rb +0 -28
- data/ffi/neo4j/driver/internal/driver_factory.rb +0 -126
- data/ffi/neo4j/driver/internal/error_handling.rb +0 -112
- data/ffi/neo4j/driver/internal/explicit_transaction.rb +0 -146
- data/ffi/neo4j/driver/internal/handlers/pull_all_response_handler.rb +0 -104
- data/ffi/neo4j/driver/internal/handlers/response_handler.rb +0 -49
- data/ffi/neo4j/driver/internal/handlers/run_response_handler.rb +0 -32
- data/ffi/neo4j/driver/internal/handlers/session_pull_all_response_handler.rb +0 -32
- data/ffi/neo4j/driver/internal/handlers/transaction_pull_all_response_handler.rb +0 -23
- data/ffi/neo4j/driver/internal/internal_driver.rb +0 -45
- data/ffi/neo4j/driver/internal/internal_logger.rb +0 -32
- data/ffi/neo4j/driver/internal/internal_resolver.rb +0 -31
- data/ffi/neo4j/driver/internal/internal_statement_result.rb +0 -52
- data/ffi/neo4j/driver/internal/messaging/bolt_protocol.rb +0 -24
- data/ffi/neo4j/driver/internal/messaging/v1/bolt_protocol_v1.rb +0 -59
- data/ffi/neo4j/driver/internal/messaging/v2/bolt_protocol_v2.rb +0 -16
- data/ffi/neo4j/driver/internal/messaging/v3/bolt_protocol_v3.rb +0 -63
- data/ffi/neo4j/driver/internal/network_session.rb +0 -129
- data/ffi/neo4j/driver/internal/retry/exponential_backoff_retry_logic.rb +0 -80
- data/ffi/neo4j/driver/internal/session_factory_impl.rb +0 -28
- data/ffi/neo4j/driver/internal/summary/internal_result_summary.rb +0 -67
- data/ffi/neo4j/driver/internal/summary/internal_server_info.rb +0 -19
- data/ffi/neo4j/driver/internal/summary/internal_summary_counters.rb +0 -23
- data/ffi/neo4j/driver/internal/util/metadata_extractor.rb +0 -15
- data/ffi/neo4j/driver/internal/value/base_time_value.rb +0 -22
- data/ffi/neo4j/driver/internal/value/date_value.rb +0 -25
- data/ffi/neo4j/driver/internal/value/duration_value.rb +0 -27
- data/ffi/neo4j/driver/internal/value/local_date_time_value.rb +0 -24
- data/ffi/neo4j/driver/internal/value/local_time_value.rb +0 -19
- data/ffi/neo4j/driver/internal/value/node_value.rb +0 -18
- data/ffi/neo4j/driver/internal/value/offset_time_value.rb +0 -25
- data/ffi/neo4j/driver/internal/value/path_value.rb +0 -41
- data/ffi/neo4j/driver/internal/value/point2_d_value.rb +0 -24
- data/ffi/neo4j/driver/internal/value/point3_d_value.rb +0 -24
- data/ffi/neo4j/driver/internal/value/relationship_value.rb +0 -18
- data/ffi/neo4j/driver/internal/value/structure_value.rb +0 -42
- data/ffi/neo4j/driver/internal/value/time_with_zone_id_value.rb +0 -25
- data/ffi/neo4j/driver/internal/value/time_with_zone_offset_value.rb +0 -28
- data/ffi/neo4j/driver/internal/value/unbound_relationship_value.rb +0 -18
- data/ffi/neo4j/driver/internal/value/value_adapter.rb +0 -101
- data/ffi/neo4j/driver/net/server_address.rb +0 -13
- data/ffi/neo4j/driver/statement.rb +0 -15
- data/ffi/neo4j/driver/types/entity.rb +0 -21
- data/ffi/neo4j/driver/types/node.rb +0 -16
- data/ffi/neo4j/driver/types/path.rb +0 -35
- data/ffi/neo4j/driver/types/relationship.rb +0 -19
- data/ffi/neo4j/driver.rb +0 -61
- data/lib/neo4j/driver/internal/ruby_signature.rb +0 -18
@@ -0,0 +1,228 @@
|
|
1
|
+
module Neo4j::Driver
|
2
|
+
module Internal
|
3
|
+
module Handlers
|
4
|
+
# This is the Pull All response handler that handles pull all messages in Bolt v3 and previous protocol versions.
|
5
|
+
class LegacyPullAllResponseHandler
|
6
|
+
include Spi::ResponseHandler
|
7
|
+
UNINITIALIZED_RECORDS = []
|
8
|
+
RECORD_BUFFER_LOW_WATERMARK = ENV['record_buffer_low_watermark']&.to_i || 300
|
9
|
+
RECORD_BUFFER_HIGH_WATERMARK = ENV['record_buffer_high_watermark']&.to_i || 1000
|
10
|
+
|
11
|
+
def initialize(query, run_response_handler, connection, metadata_extractor, completion_listener)
|
12
|
+
@query = Util::Validator.require_non_nil!(query)
|
13
|
+
@run_response_handler = Util::Validator.require_non_nil!(run_response_handler)
|
14
|
+
@metadata_extractor = Util::Validator.require_non_nil!(metadata_extractor)
|
15
|
+
@connection = Util::Validator.require_non_nil!(connection)
|
16
|
+
@completion_listener = Util::Validator.require_non_nil!(completion_listener)
|
17
|
+
@records = UNINITIALIZED_RECORDS
|
18
|
+
end
|
19
|
+
|
20
|
+
def can_manage_auto_read?
|
21
|
+
true
|
22
|
+
end
|
23
|
+
|
24
|
+
def on_success(metadata)
|
25
|
+
@finished = true
|
26
|
+
@summary = extract_result_summary(metadata)
|
27
|
+
|
28
|
+
@completion_listener.after_success(metadata)
|
29
|
+
|
30
|
+
complete_record_future(nil)
|
31
|
+
complete_failure_future(nil)
|
32
|
+
end
|
33
|
+
|
34
|
+
def on_failure(error)
|
35
|
+
@finished = true
|
36
|
+
@summary = extract_result_summary({})
|
37
|
+
|
38
|
+
@completion_listener.after_failure(error)
|
39
|
+
|
40
|
+
failed_record_future = fail_record_future(error)
|
41
|
+
|
42
|
+
if fail_record_future
|
43
|
+
# error propagated through the record future
|
44
|
+
complete_failure_future(nil)
|
45
|
+
else
|
46
|
+
completed_failure_future = complete_failure_future(error)
|
47
|
+
|
48
|
+
# error has not been propagated to the user, remember it
|
49
|
+
@failure = error unless completed_failure_future
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def on_record(fields)
|
54
|
+
if @ignore_records
|
55
|
+
complete_record_future(nil)
|
56
|
+
else
|
57
|
+
record = InternalRecord.new(run_response_handler.query_keys, fields)
|
58
|
+
enqueue_record(record)
|
59
|
+
complete_record_future(record)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def disable_auto_read_management
|
64
|
+
@auto_read_management_enabled = false
|
65
|
+
end
|
66
|
+
|
67
|
+
def peek_async
|
68
|
+
record = @records.first
|
69
|
+
|
70
|
+
if record.nil?
|
71
|
+
return Util::Futures.failed_future(extract_failure) unless @failure.nil?
|
72
|
+
|
73
|
+
return Util::Futures.completed_with_null if @ignore_records || @finished
|
74
|
+
|
75
|
+
@record_future = java.util.concurrent.CompletableFuture.new if @record_future.nil?
|
76
|
+
|
77
|
+
@record_future
|
78
|
+
else
|
79
|
+
java.util.concurrent.CompletableFuture.completed_future(record)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def next_async
|
84
|
+
peek_async.then_apply(-> (_ignore) { dequeue_record })
|
85
|
+
end
|
86
|
+
|
87
|
+
def consume_async
|
88
|
+
@ignore_records = true
|
89
|
+
@records.clear
|
90
|
+
|
91
|
+
pull_all_failure_async.then_apply do |error|
|
92
|
+
unless error.nil?
|
93
|
+
raise Util::Futures.as_completion_exception, error
|
94
|
+
end
|
95
|
+
|
96
|
+
@summary
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
def list_async(map_function)
|
101
|
+
pull_all_failure_async.then_apply do |error|
|
102
|
+
unless error.nil?
|
103
|
+
raise Util::Futures.as_completion_exception, error
|
104
|
+
end
|
105
|
+
|
106
|
+
records_as_list(map_function)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
def pre_populate_records
|
111
|
+
@connection.write_and_flush(Messaging::Request::PullAllMessage::PULL_ALL, self)
|
112
|
+
end
|
113
|
+
|
114
|
+
def pull_all_failure_async
|
115
|
+
if !@failure.nil?
|
116
|
+
return java.util.concurrent.CompletableFuture.completed_future(extract_failure)
|
117
|
+
elsif @finished
|
118
|
+
return Util::Futures.completed_with_null
|
119
|
+
else
|
120
|
+
if @failure_future.nil?
|
121
|
+
# neither SUCCESS nor FAILURE message has arrived, register future to be notified when it arrives
|
122
|
+
# future will be completed with null on SUCCESS and completed with Throwable on FAILURE
|
123
|
+
# enable auto-read, otherwise we might not read SUCCESS/FAILURE if records are not consumed
|
124
|
+
enable_auto_read
|
125
|
+
@failure_future = java.util.concurrent.CompletableFuture.new
|
126
|
+
end
|
127
|
+
|
128
|
+
@failure_future
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
private
|
133
|
+
|
134
|
+
def enqueue_record(record)
|
135
|
+
@records << record
|
136
|
+
|
137
|
+
should_buffer_all_records = !@failure_future.nil?
|
138
|
+
|
139
|
+
# when failure is requested we have to buffer all remaining records and then return the error
|
140
|
+
# do not disable auto-read in this case, otherwise records will not be consumed and trailing
|
141
|
+
# SUCCESS or FAILURE message will not arrive as well, so callers will get stuck waiting for the error
|
142
|
+
if !should_buffer_all_records && records.size > RECORD_BUFFER_HIGH_WATERMARK
|
143
|
+
# more than high watermark records are already queued, tell connection to stop auto-reading from network
|
144
|
+
# this is needed to deal with slow consumers, we do not want to buffer all records in memory if they are
|
145
|
+
# fetched from network faster than consumed
|
146
|
+
disable_auto_read
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
def dequeue_record
|
151
|
+
record = @records.drop(1)
|
152
|
+
|
153
|
+
if @records.size < RECORD_BUFFER_LOW_WATERMARK
|
154
|
+
# less than low watermark records are now available in the buffer, tell connection to pre-fetch more
|
155
|
+
# and populate queue with new records from network
|
156
|
+
enable_auto_read
|
157
|
+
end
|
158
|
+
|
159
|
+
record
|
160
|
+
end
|
161
|
+
|
162
|
+
def records_as_list(map_function)
|
163
|
+
unless @finished
|
164
|
+
raise Exceptions::IllegalStateException, "Can't get records as list because SUCCESS or FAILURE did not arrive"
|
165
|
+
end
|
166
|
+
|
167
|
+
result = []
|
168
|
+
|
169
|
+
@records.each do |record|
|
170
|
+
result << map_function.apply(record)
|
171
|
+
end
|
172
|
+
|
173
|
+
@records.clear
|
174
|
+
result
|
175
|
+
end
|
176
|
+
|
177
|
+
def extract_failure
|
178
|
+
@failure or raise Exceptions::IllegalStateException, "Can't extract failure because it does not exist"
|
179
|
+
ensure
|
180
|
+
@failure = nil # propagate failure only once
|
181
|
+
end
|
182
|
+
|
183
|
+
def complete_record_future(record)
|
184
|
+
unless @record_future.nil?
|
185
|
+
future = @record_future
|
186
|
+
@record_future = nil
|
187
|
+
future.complete(record)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
def fail_record_future(error)
|
192
|
+
unless @record_future.nil?
|
193
|
+
future = @record_future
|
194
|
+
@record_future = nil
|
195
|
+
future.complete_exceptionally(error)
|
196
|
+
return true
|
197
|
+
end
|
198
|
+
|
199
|
+
false
|
200
|
+
end
|
201
|
+
|
202
|
+
def complete_failure_future(error)
|
203
|
+
unless @failure_future.nil?
|
204
|
+
future = @failure_future
|
205
|
+
@failure_future = nil
|
206
|
+
future.complete(error)
|
207
|
+
return true
|
208
|
+
end
|
209
|
+
|
210
|
+
false
|
211
|
+
end
|
212
|
+
|
213
|
+
def extract_result_summary(metadata)
|
214
|
+
result_available_after = @run_response_handler.result_available_after
|
215
|
+
@metadataExtractor.extract_summary(@query, @connection, result_available_after, metadata)
|
216
|
+
end
|
217
|
+
|
218
|
+
def enable_auto_read
|
219
|
+
@connection.enable_auto_read if @auto_read_management_enabled
|
220
|
+
end
|
221
|
+
|
222
|
+
def disable_auto_read
|
223
|
+
@connection.disable_auto_read if @auto_read_management_enabled
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Neo4j::Driver
|
2
|
+
module Internal
|
3
|
+
module Handlers
|
4
|
+
class NoOpResponseHandler
|
5
|
+
include Spi::ResponseHandler
|
6
|
+
INSTANCE = new
|
7
|
+
|
8
|
+
def on_success(metadata) end
|
9
|
+
|
10
|
+
def on_failure(error) end
|
11
|
+
|
12
|
+
def on_record(fields) end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Neo4j::Driver
|
2
|
+
module Internal
|
3
|
+
module Handlers
|
4
|
+
class PingResponseHandler
|
5
|
+
include Spi::ResponseHandler
|
6
|
+
|
7
|
+
def initialize(result, channel, logger)
|
8
|
+
@result = result
|
9
|
+
@channel = channel
|
10
|
+
@log = logger
|
11
|
+
end
|
12
|
+
|
13
|
+
def on_success(_metadata)
|
14
|
+
@log.debug("Channel #{@channel} pinged successfully")
|
15
|
+
@result.set_success(true)
|
16
|
+
end
|
17
|
+
|
18
|
+
def on_failure(error)
|
19
|
+
@log.debug("Channel #{@channel} failed ping #{error}")
|
20
|
+
@result.set_success(false)
|
21
|
+
end
|
22
|
+
|
23
|
+
def on_record(fields)
|
24
|
+
raise java.lang.UnsupportedOperationException
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Neo4j::Driver
|
2
|
+
module Internal
|
3
|
+
module Handlers
|
4
|
+
class PullHandlers
|
5
|
+
include Spi::ResponseHandler
|
6
|
+
|
7
|
+
class << self
|
8
|
+
def new_bolt_v3_pull_all_handler(query, run_handler, connection, bookmark_holder, tx)
|
9
|
+
completion_listener = create_pull_response_completion_listener(connection, bookmark_holder, tx)
|
10
|
+
LegacyPullAllResponseHandler.new(query, run_handler, connection, Messaging::V3::BoltProtocolV3::METADATA_EXTRACTOR, completion_listener)
|
11
|
+
end
|
12
|
+
|
13
|
+
def new_bolt_v4_auto_pull_handler(query, run_handler, connection, bookmark_holder, tx, fetch_size)
|
14
|
+
completion_listener = create_pull_response_completion_listener(connection, bookmark_holder, tx)
|
15
|
+
Pulln::AutoPullResponseHandler.new(query, run_handler, connection, Messaging::V3::BoltProtocolV3::METADATA_EXTRACTOR, completion_listener, fetch_size)
|
16
|
+
end
|
17
|
+
|
18
|
+
def new_bolt_v4_basic_pull_handler(query, run_handler, connection, bookmark_holder, tx)
|
19
|
+
completion_listener = create_pull_response_completion_listener(connection, bookmark_holder, tx)
|
20
|
+
Pulln::BasicPullResponseHandler.new(query, run_handler, connection, Messaging::V3::BoltProtocolV3::METADATA_EXTRACTOR, completion_listener)
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def create_pull_response_completion_listener(connection, bookmark_holder, tx)
|
26
|
+
tx.nil? ? SessionPullResponseCompletionListener.new(connection, bookmark_holder) : TransactionPullResponseCompletionListener.new(tx)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,174 @@
|
|
1
|
+
module Neo4j::Driver
|
2
|
+
module Internal
|
3
|
+
module Handlers
|
4
|
+
module Pulln
|
5
|
+
class AutoPullResponseHandler < BasicPullResponseHandler
|
6
|
+
delegate :signal, to: :@records
|
7
|
+
UNINITIALIZED_RECORDS = ::Async::Queue.new
|
8
|
+
LONG_MAX_VALUE = 2 ** 63 - 1
|
9
|
+
|
10
|
+
def initialize(query, run_response_handler, connection, metadata_extractor, completion_listener, fetch_size)
|
11
|
+
super(query, run_response_handler, connection, metadata_extractor, completion_listener)
|
12
|
+
@fetch_size = fetch_size
|
13
|
+
|
14
|
+
# For pull everything ensure conditions for disabling auto pull are never met
|
15
|
+
if fetch_size == FetchSizeUtil::UNLIMITED_FETCH_SIZE
|
16
|
+
@high_record_watermark = LONG_MAX_VALUE
|
17
|
+
@low_record_watermark = LONG_MAX_VALUE
|
18
|
+
else
|
19
|
+
@high_record_watermark = fetch_size * 0.7
|
20
|
+
@low_record_watermark = fetch_size * 0.3
|
21
|
+
end
|
22
|
+
|
23
|
+
@records = UNINITIALIZED_RECORDS
|
24
|
+
@auto_pull_enabled = true
|
25
|
+
|
26
|
+
install_record_and_summary_consumers
|
27
|
+
end
|
28
|
+
|
29
|
+
private def install_record_and_summary_consumers
|
30
|
+
install_record_consumer do |record, error|
|
31
|
+
if record
|
32
|
+
enqueue_record(record)
|
33
|
+
complete_record_future(record)
|
34
|
+
end
|
35
|
+
|
36
|
+
# if !error.nil? Handled by summary.error already
|
37
|
+
if record.nil? && error.nil?
|
38
|
+
# complete
|
39
|
+
complete_record_future(nil)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
install_summary_consumer do |summary, error|
|
44
|
+
handle_failure(error) if error
|
45
|
+
|
46
|
+
if summary
|
47
|
+
@summary = summary
|
48
|
+
complete_summary_future(summary)
|
49
|
+
end
|
50
|
+
|
51
|
+
if error.nil? && summary.nil? # has_more
|
52
|
+
request(@fetch_size) if @auto_pull_enabled
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
private def handle_failure(error)
|
58
|
+
# error has not been propagated to the user, remember it
|
59
|
+
unless fail_record_future(error) && fail_summary_future(error)
|
60
|
+
@failure = error
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def peek_async
|
65
|
+
while @records.empty? && !done?
|
66
|
+
@records.wait
|
67
|
+
end
|
68
|
+
@records.items.first
|
69
|
+
end
|
70
|
+
|
71
|
+
def next_async
|
72
|
+
dequeue_record if peek_async
|
73
|
+
end
|
74
|
+
|
75
|
+
def consume_async
|
76
|
+
@records.items.clear
|
77
|
+
return completed_with_value_if_no_failure(@summary) if done?
|
78
|
+
cancel
|
79
|
+
@summary
|
80
|
+
end
|
81
|
+
|
82
|
+
def list_async(map_function)
|
83
|
+
pull_all_async.then_apply(-> (summary) { records_as_list(map_function) })
|
84
|
+
end
|
85
|
+
|
86
|
+
def pull_all_failure_async
|
87
|
+
pull_all_async
|
88
|
+
end
|
89
|
+
|
90
|
+
def pre_populate_records
|
91
|
+
request(@fetch_size)
|
92
|
+
end
|
93
|
+
|
94
|
+
private
|
95
|
+
|
96
|
+
def pull_all_async
|
97
|
+
return completed_with_value_if_no_failure(@summary) if done?
|
98
|
+
|
99
|
+
request(FetchSizeUtil::UNLIMITED_FETCH_SIZE)
|
100
|
+
|
101
|
+
@summary_future = java.util.concurrent.CompletableFuture.new if @summary_future.nil?
|
102
|
+
|
103
|
+
@summary_future
|
104
|
+
end
|
105
|
+
|
106
|
+
def enqueue_record(record)
|
107
|
+
@records << record
|
108
|
+
|
109
|
+
# too many records in the queue, pause auto request gathering
|
110
|
+
@auto_pull_enabled = false if @records.size > @high_record_watermark
|
111
|
+
end
|
112
|
+
|
113
|
+
def dequeue_record
|
114
|
+
record = @records.dequeue
|
115
|
+
|
116
|
+
if @records.size <= @low_record_watermark
|
117
|
+
# if not in streaming state we need to restart streaming
|
118
|
+
request(@fetch_size) if state != State::STREAMING_STATE
|
119
|
+
|
120
|
+
@auto_pull_enabled = true
|
121
|
+
end
|
122
|
+
|
123
|
+
record
|
124
|
+
end
|
125
|
+
|
126
|
+
def records_as_list(&map_function)
|
127
|
+
unless done?
|
128
|
+
raise Exceptions::IllegalStateException, "Can't get records as list because SUCCESS or FAILURE did not arrive"
|
129
|
+
end
|
130
|
+
|
131
|
+
@records.each.map(&map_function)
|
132
|
+
end
|
133
|
+
|
134
|
+
def extract_failure
|
135
|
+
@failure or raise Exceptions::IllegalStateException, "Can't extract failure because it does not exist"
|
136
|
+
ensure
|
137
|
+
@failure = nil # propagate failure only once
|
138
|
+
end
|
139
|
+
|
140
|
+
def complete_record_future(record)
|
141
|
+
unless @record_future.nil?
|
142
|
+
future = @record_future
|
143
|
+
@record_future = nil
|
144
|
+
future.complete(record)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
def complete_summary_future(summary)
|
149
|
+
unless @summary_future.nil?
|
150
|
+
future = @summary_future
|
151
|
+
@summary_future = nil
|
152
|
+
future.complete(summary)
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
def fail_record_future(error)
|
157
|
+
unless @record_future.nil?
|
158
|
+
future = @record_future
|
159
|
+
@record_future = nil
|
160
|
+
future.complete(record)
|
161
|
+
return true
|
162
|
+
end
|
163
|
+
|
164
|
+
false
|
165
|
+
end
|
166
|
+
|
167
|
+
def completed_with_value_if_no_failure(value)
|
168
|
+
@failure ? extract_failure : value
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|