Class: Couchbase::Options::Cluster
- Inherits:
-
Object
- Object
- Couchbase::Options::Cluster
- Defined in:
- lib/couchbase/options.rb
Overview
Options for Cluster.connect
Instance Attribute Summary collapse
- #analytics_threshold ⇒ nil, ...
- #analytics_timeout ⇒ nil, ...
- #authenticator ⇒ PasswordAuthenticator, CertificateAuthenticator
- #bootstrap_timeout ⇒ nil, ...
- #config_idle_redial_timeout ⇒ nil, ...
- #config_poll_floor ⇒ nil, ...
- #config_poll_interval ⇒ nil, ...
- #connect_timeout ⇒ nil, ...
- #dns_srv_timeout ⇒ nil, ...
- #enable_metrics ⇒ Boolean
- #enable_tracing ⇒ Boolean
- #idle_http_connection_timeout ⇒ nil, ...
- #key_value_threshold ⇒ nil, ...
- #key_value_timeout ⇒ nil, ...
- #management_threshold ⇒ nil, ...
- #management_timeout ⇒ nil, ...
- #metrics_emit_interval ⇒ nil, ...
- #orphaned_emit_interval ⇒ nil, ...
- #orphaned_sample_size ⇒ nil, Integer
- #query_threshold ⇒ nil, ...
- #query_timeout ⇒ nil, ...
- #resolve_timeout ⇒ nil, ...
- #search_threshold ⇒ nil, ...
- #search_timeout ⇒ nil, ...
- #tcp_keep_alive_interval ⇒ nil, ...
- #threshold_emit_interval ⇒ nil, ...
- #threshold_sample_size ⇒ nil, Integer
- #view_threshold ⇒ nil, ...
- #view_timeout ⇒ nil, ...
Instance Method Summary collapse
- #apply_profile(profile_name) ⇒ Object
- #authenticate(username, password) ⇒ Object
-
#initialize(authenticator: nil, enable_metrics: nil, metrics_emit_interval: nil, enable_tracing: nil, orphaned_emit_interval: nil, orphaned_sample_size: nil, threshold_emit_interval: nil, threshold_sample_size: nil, key_value_threshold: nil, query_threshold: nil, view_threshold: nil, search_threshold: nil, analytics_threshold: nil, management_threshold: nil, bootstrap_timeout: nil, resolve_timeout: nil, connect_timeout: nil, key_value_timeout: nil, view_timeout: nil, query_timeout: nil, analytics_timeout: nil, search_timeout: nil, management_timeout: nil, dns_srv_timeout: nil, tcp_keep_alive_interval: nil, config_poll_interval: nil, config_poll_floor: nil, config_idle_redial_timeout: nil, idle_http_connection_timeout: nil) {|self| ... } ⇒ Cluster
constructor
Creates an instance of options for Cluster.connect.
- #to_backend ⇒ Object private
Constructor Details
#initialize(authenticator: nil, enable_metrics: nil, metrics_emit_interval: nil, enable_tracing: nil, orphaned_emit_interval: nil, orphaned_sample_size: nil, threshold_emit_interval: nil, threshold_sample_size: nil, key_value_threshold: nil, query_threshold: nil, view_threshold: nil, search_threshold: nil, analytics_threshold: nil, management_threshold: nil, bootstrap_timeout: nil, resolve_timeout: nil, connect_timeout: nil, key_value_timeout: nil, view_timeout: nil, query_timeout: nil, analytics_timeout: nil, search_timeout: nil, management_timeout: nil, dns_srv_timeout: nil, tcp_keep_alive_interval: nil, config_poll_interval: nil, config_poll_floor: nil, config_idle_redial_timeout: nil, idle_http_connection_timeout: nil) {|self| ... } ⇒ Cluster
Creates an instance of options for Cluster.connect
1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 |
# File 'lib/couchbase/options.rb', line 1692 def initialize(authenticator: nil, enable_metrics: nil, metrics_emit_interval: nil, enable_tracing: nil, orphaned_emit_interval: nil, orphaned_sample_size: nil, threshold_emit_interval: nil, threshold_sample_size: nil, key_value_threshold: nil, query_threshold: nil, view_threshold: nil, search_threshold: nil, analytics_threshold: nil, management_threshold: nil, bootstrap_timeout: nil, resolve_timeout: nil, connect_timeout: nil, key_value_timeout: nil, view_timeout: nil, query_timeout: nil, analytics_timeout: nil, search_timeout: nil, management_timeout: nil, dns_srv_timeout: nil, tcp_keep_alive_interval: nil, config_poll_interval: nil, config_poll_floor: nil, config_idle_redial_timeout: nil, idle_http_connection_timeout: nil) @authenticator = authenticator @enable_metrics = enable_metrics @metrics_emit_interval = metrics_emit_interval @enable_tracing = enable_tracing @orphaned_emit_interval = orphaned_emit_interval @orphaned_sample_size = orphaned_sample_size @threshold_emit_interval = threshold_emit_interval @threshold_sample_size = threshold_sample_size @key_value_threshold = key_value_threshold @query_threshold = query_threshold @view_threshold = view_threshold @search_threshold = search_threshold @analytics_threshold = analytics_threshold @management_threshold = management_threshold @bootstrap_timeout = bootstrap_timeout @resolve_timeout = resolve_timeout @connect_timeout = connect_timeout @key_value_timeout = key_value_timeout @view_timeout = view_timeout @query_timeout = query_timeout @analytics_timeout = analytics_timeout @search_timeout = search_timeout @management_timeout = management_timeout @dns_srv_timeout = dns_srv_timeout @tcp_keep_alive_interval = tcp_keep_alive_interval @config_poll_interval = config_poll_interval @config_poll_floor = config_poll_floor @config_idle_redial_timeout = config_idle_redial_timeout @idle_http_connection_timeout = idle_http_connection_timeout yield self if block_given? end |
Instance Attribute Details
#analytics_threshold ⇒ nil, ...
1660 1661 1662 |
# File 'lib/couchbase/options.rb', line 1660 def analytics_threshold @analytics_threshold end |
#analytics_timeout ⇒ nil, ...
1669 1670 1671 |
# File 'lib/couchbase/options.rb', line 1669 def analytics_timeout @analytics_timeout end |
#authenticator ⇒ PasswordAuthenticator, CertificateAuthenticator
1647 1648 1649 |
# File 'lib/couchbase/options.rb', line 1647 def authenticator @authenticator end |
#bootstrap_timeout ⇒ nil, ...
1663 1664 1665 |
# File 'lib/couchbase/options.rb', line 1663 def bootstrap_timeout @bootstrap_timeout end |
#config_idle_redial_timeout ⇒ nil, ...
1676 1677 1678 |
# File 'lib/couchbase/options.rb', line 1676 def config_idle_redial_timeout @config_idle_redial_timeout end |
#config_poll_floor ⇒ nil, ...
1675 1676 1677 |
# File 'lib/couchbase/options.rb', line 1675 def config_poll_floor @config_poll_floor end |
#config_poll_interval ⇒ nil, ...
1674 1675 1676 |
# File 'lib/couchbase/options.rb', line 1674 def config_poll_interval @config_poll_interval end |
#connect_timeout ⇒ nil, ...
1665 1666 1667 |
# File 'lib/couchbase/options.rb', line 1665 def connect_timeout @connect_timeout end |
#dns_srv_timeout ⇒ nil, ...
1672 1673 1674 |
# File 'lib/couchbase/options.rb', line 1672 def dns_srv_timeout @dns_srv_timeout end |
#enable_metrics ⇒ Boolean
1649 1650 1651 |
# File 'lib/couchbase/options.rb', line 1649 def enable_metrics @enable_metrics end |
#enable_tracing ⇒ Boolean
1651 1652 1653 |
# File 'lib/couchbase/options.rb', line 1651 def enable_tracing @enable_tracing end |
#idle_http_connection_timeout ⇒ nil, ...
1677 1678 1679 |
# File 'lib/couchbase/options.rb', line 1677 def idle_http_connection_timeout @idle_http_connection_timeout end |
#key_value_threshold ⇒ nil, ...
1656 1657 1658 |
# File 'lib/couchbase/options.rb', line 1656 def key_value_threshold @key_value_threshold end |
#key_value_timeout ⇒ nil, ...
1666 1667 1668 |
# File 'lib/couchbase/options.rb', line 1666 def key_value_timeout @key_value_timeout end |
#management_threshold ⇒ nil, ...
1661 1662 1663 |
# File 'lib/couchbase/options.rb', line 1661 def management_threshold @management_threshold end |
#management_timeout ⇒ nil, ...
1671 1672 1673 |
# File 'lib/couchbase/options.rb', line 1671 def management_timeout @management_timeout end |
#metrics_emit_interval ⇒ nil, ...
1650 1651 1652 |
# File 'lib/couchbase/options.rb', line 1650 def metrics_emit_interval @metrics_emit_interval end |
#orphaned_emit_interval ⇒ nil, ...
1652 1653 1654 |
# File 'lib/couchbase/options.rb', line 1652 def orphaned_emit_interval @orphaned_emit_interval end |
#orphaned_sample_size ⇒ nil, Integer
1653 1654 1655 |
# File 'lib/couchbase/options.rb', line 1653 def orphaned_sample_size @orphaned_sample_size end |
#query_threshold ⇒ nil, ...
1657 1658 1659 |
# File 'lib/couchbase/options.rb', line 1657 def query_threshold @query_threshold end |
#query_timeout ⇒ nil, ...
1668 1669 1670 |
# File 'lib/couchbase/options.rb', line 1668 def query_timeout @query_timeout end |
#resolve_timeout ⇒ nil, ...
1664 1665 1666 |
# File 'lib/couchbase/options.rb', line 1664 def resolve_timeout @resolve_timeout end |
#search_threshold ⇒ nil, ...
1659 1660 1661 |
# File 'lib/couchbase/options.rb', line 1659 def search_threshold @search_threshold end |
#search_timeout ⇒ nil, ...
1670 1671 1672 |
# File 'lib/couchbase/options.rb', line 1670 def search_timeout @search_timeout end |
#tcp_keep_alive_interval ⇒ nil, ...
1673 1674 1675 |
# File 'lib/couchbase/options.rb', line 1673 def tcp_keep_alive_interval @tcp_keep_alive_interval end |
#threshold_emit_interval ⇒ nil, ...
1654 1655 1656 |
# File 'lib/couchbase/options.rb', line 1654 def threshold_emit_interval @threshold_emit_interval end |
#threshold_sample_size ⇒ nil, Integer
1655 1656 1657 |
# File 'lib/couchbase/options.rb', line 1655 def threshold_sample_size @threshold_sample_size end |
#view_threshold ⇒ nil, ...
1658 1659 1660 |
# File 'lib/couchbase/options.rb', line 1658 def view_threshold @view_threshold end |
#view_timeout ⇒ nil, ...
1667 1668 1669 |
# File 'lib/couchbase/options.rb', line 1667 def view_timeout @view_timeout end |
Instance Method Details
#apply_profile(profile_name) ⇒ Object
1760 1761 1762 |
# File 'lib/couchbase/options.rb', line 1760 def apply_profile(profile_name) ConfigProfiles::KNOWN_PROFILES.apply(profile_name, self) end |
#authenticate(username, password) ⇒ Object
1755 1756 1757 |
# File 'lib/couchbase/options.rb', line 1755 def authenticate(username, password) @authenticator = PasswordAuthenticator.new(username, password) end |
#to_backend ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 |
# File 'lib/couchbase/options.rb', line 1765 def to_backend { enable_metrics: @enable_metrics, metrics_emit_interval: Utils::Time.extract_duration(@metrics_emit_interval), enable_tracing: @enable_tracing, orphaned_emit_interval: Utils::Time.extract_duration(@orphaned_emit_interval), orphaned_sample_size: @orphaned_sample_size, threshold_emit_interval: Utils::Time.extract_duration(@threshold_emit_interval), threshold_sample_size: @threshold_sample_size, key_value_threshold: Utils::Time.extract_duration(@key_value_threshold), query_threshold: Utils::Time.extract_duration(@query_threshold), view_threshold: Utils::Time.extract_duration(@view_threshold), search_threshold: Utils::Time.extract_duration(@search_threshold), analytics_threshold: Utils::Time.extract_duration(@analytics_threshold), management_threshold: Utils::Time.extract_duration(@management_threshold), bootstrap_timeout: Utils::Time.extract_duration(@bootstrap_timeout), resolve_timeout: Utils::Time.extract_duration(@resolve_timeout), connect_timeout: Utils::Time.extract_duration(@connect_timeout), key_value_timeout: Utils::Time.extract_duration(@key_value_timeout), view_timeout: Utils::Time.extract_duration(@view_timeout), query_timeout: Utils::Time.extract_duration(@query_timeout), analytics_timeout: Utils::Time.extract_duration(@analytics_timeout), search_timeout: Utils::Time.extract_duration(@search_timeout), management_timeout: Utils::Time.extract_duration(@management_timeout), dns_srv_timeout: Utils::Time.extract_duration(@dns_srv_timeout), tcp_keep_alive_interval: Utils::Time.extract_duration(@tcp_keep_alive_interval), config_poll_interval: Utils::Time.extract_duration(@config_poll_interval), config_poll_floor: Utils::Time.extract_duration(@config_poll_floor), config_idle_redial_timeout: Utils::Time.extract_duration(@config_idle_redial_timeout), idle_http_connection_timeout: Utils::Time.extract_duration(@idle_http_connection_timeout), } end |