Class: MintPress::OracleTrafficDirector::OriginServer

Inherits:
Object
  • Object
show all
Includes:
MintLogger, Mixins::Properties, OtdCommon
Defined in:
src/oracle-otd/lib/oracle-otd/generated/origin_server.rb,
src/oracle-otd/lib/oracle-otd/otd-origin-server-functions.rb

Overview

set the following properties of an origin-server:

Properties (Read/Write)

  • #name ⇒ String

    Property Attributes
    
    
    30
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 30
    
    property :name, type: String
  • #drain_timeout ⇒ Integer
    'How long to wait when draining origin server'

    Property Attributes
    
    
    31
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 31
    
    property :drain_timeout, type: Integer, description: 'How long to wait when draining origin server'
  • #configuration ⇒ [MintPress::OracleTrafficDirector::Configuration] (Default Value: Proc.new { origin_server_pool.configuration })
    'Name of the configuration.'

    Property Attributes
    • otd_proptrue
    • otd_mandatorytrue
    • fromString
    • delete_proptrue
    • otd_delete_mandatorytrue
    • set_proptrue
    • defaultProc.new { origin_server_pool.configuration }
    
    
    33
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 33
    
    property :configuration, description: 'Name of the configuration.', otd_prop: true, otd_mandatory: true, type: [MintPress::OracleTrafficDirector::Configuration], from: String, delete_prop: true, otd_delete_mandatory: true, set_prop: true, default: Proc.new { origin_server_pool.configuration }
  • #origin_server_pool ⇒ [MintPress::OracleTrafficDirector::OriginServerPool]
    'Name of the origin server pool.'

    Property Attributes
    • otd_proptrue
    • otd_mandatorytrue
    • fromString
    • delete_proptrue
    • otd_delete_mandatorytrue
    • set_proptrue
    
    
    35
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 35
    
    property :origin_server_pool, description: 'Name of the origin server pool.', otd_prop: true, otd_mandatory: true, type: [MintPress::OracleTrafficDirector::OriginServerPool], from: String, delete_prop: true, otd_delete_mandatory: true, set_prop: true
  • #host ⇒ String (Default Value: Proc.new { self.name.split(":")[0] })
    'IP address/Host name of the origin server.'

    Property Attributes
    • otd_proptrue
    • otd_mandatorytrue
    • delete_proptrue
    • otd_delete_mandatorytrue
    • set_proptrue
    • defaultProc.new { self.name.split(":")[0] }
    
    
    37
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 37
    
    property :host, description: 'IP address/Host name of the origin server.', otd_prop: true, otd_mandatory: true, type: String, delete_prop: true, otd_delete_mandatory: true, set_prop: true, default: Proc.new { self.name.split(":")[0] }
  • #port ⇒ Integer (Default Value: Proc.new { self.name.split(":")[1].to_i })
    'Port number of the origin server.'

    Property Attributes
    • otd_proptrue
    • otd_mandatorytrue
    • delete_proptrue
    • otd_delete_mandatorytrue
    • set_proptrue
    • defaultProc.new { self.name.split(":")[1].to_i }
    
    
    39
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 39
    
    property :port, description: 'Port number of the origin server.', otd_prop: true, otd_mandatory: true, type: Integer, delete_prop: true, otd_delete_mandatory: true, set_prop: true, default: Proc.new { self.name.split(":")[1].to_i }
  • #weight ⇒ Integer
    'Load distribution weight for this origin server. Range of values: 1 - 1000. Default: 1.'

    Property Attributes
    • otd_proptrue
    • set_proptrue
    
    
    43
    44
    45
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 43
    
    property :weight, description: 'Load distribution weight for this origin server.
    Range of values: 1 - 1000.
    Default: 1.', otd_prop: true, type: Integer, set_prop: true
  • #backup ⇒ [TrueClass, FalseClass]
    'The parameter specifies if the origin server is a backup server. Range of values: true or false. Default: false.'

    Property Attributes
    • otd_proptrue
    • set_proptrue
    
    
    49
    50
    51
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 49
    
    property :backup, description: 'The parameter specifies if the origin server is a backup server.
    Range of values: true or false.
    Default: false.', otd_prop: true, type: [TrueClass, FalseClass], set_prop: true
  • #max_connections ⇒ Integer
    'The maximum number of concurrent connections to a server. -1 indicates that there is no maximum. Range of values: -1, 1 - 1048576. Default: -1.'

    Property Attributes
    • otd_proptrue
    • set_proptrue
    
    
    55
    56
    57
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 55
    
    property :max_connections, description: 'The maximum number of concurrent connections to a server. -1 indicates that there is no maximum.
    Range of values: -1, 1 - 1048576.
    Default: -1.', otd_prop: true, type: Integer, set_prop: true
  • #ramp_up_time ⇒ Float
    'The time in seconds to ramp the sending rate up to the capacity of a newly up origin server. If the parameter is not specified, request rate accelerating will not be activated for the server. Range of values: an interval in seconds between 0.001 and 3600 (1 hour), inclusive. Default: 0.001.'

    Property Attributes
    • otd_proptrue
    • set_proptrue
    
    
    61
    62
    63
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 61
    
    property :ramp_up_time, description: 'The time in seconds to ramp the sending rate up to the capacity of a newly up origin server. If the parameter is not specified, request rate accelerating will not be activated for the server.
    Range of values: an interval in seconds between 0.001 and 3600 (1 hour), inclusive.
    Default: 0.001.', otd_prop: true, type: Float, set_prop: true
  • #mode ⇒ String
    'Mode.of this origin server. Range of values: enabled, disabled, draining. Default: enabled.'

    Property Attributes
    • set_proptrue
    
    
    67
    68
    69
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 67
    
    property :mode, description: 'Mode.of this origin server.
    Range of values: enabled, disabled, draining.
    Default: enabled.', set_prop: true, type: String
  • #max_requests_per_connection ⇒ Integer
    'Maximum limit on times a connection to origin server can be reused for different requests. -1 indicates there is no limit. Range of values: -1, 1 - 2147483647. Default: -1.'

    Property Attributes
    • set_proptrue
    
    
    73
    74
    75
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 73
    
    property :max_requests_per_connection, description: 'Maximum limit on times a connection to origin server can be reused for different requests. -1 indicates there is no limit.
    Range of values: -1, 1 - 2147483647.
    Default: -1.', set_prop: true, type: Integer
  • #max_request_bps ⇒ Integer
    'Total bandwidth limit in byte/second enforced on request. Range of values: 0 - 1099511627776. Default: 0.'

    Property Attributes
    • set_proptrue
    
    
    79
    80
    81
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 79
    
    property :max_request_bps, description: 'Total bandwidth limit in byte/second enforced on request.
    Range of values: 0 - 1099511627776.
    Default: 0.', set_prop: true, type: Integer
  • #max_response_bps ⇒ Integer
    'Total bandwidth limit in byte/second enforced on response. Range of values: 0 - 1099511627776. Default: 0.'

    Property Attributes
    • set_proptrue
    
    
    85
    86
    87
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 85
    
    property :max_response_bps, description: 'Total bandwidth limit in byte/second enforced on response.
    Range of values: 0 - 1099511627776.
    Default: 0.', set_prop: true, type: Integer
  • #bandwidth_queue_timeout ⇒ Integer
    'Request is aborted when it had to wait in the queue for bandwidth for this much time in second. Range of values: 0 - 86400. Default: 60.'

    Property Attributes
    • set_proptrue
    
    
    91
    92
    93
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 91
    
    property :bandwidth_queue_timeout, description: 'Request is aborted when it had to wait in the queue for bandwidth for this much time in second.
    Range of values: 0 - 86400.
    Default: 60.', set_prop: true, type: Integer
  • #parent ⇒ MintPress::OracleTrafficDirector::OriginServerPool

    Property Attributes
    
    
    94
    # File 'src/oracle-otd/lib/oracle-otd/generated/origin_server.rb', line 94
    
    property :parent, type: MintPress::OracleTrafficDirector::OriginServerPool

Properties (Read Only)

Constant Summary collapse

MODEL_PARENTS =
["configuration", "origin-server-pool"]
LIST_PARAMS =
["configuration", "origin-server-pool"]
GET_PARAMS =
["configuration", "origin-server-pool", "host", "port"]

Constants included from MintLogger

MintLogger::DEBUG, MintLogger::ERROR, MintLogger::FATAL, MintLogger::INFO, MintLogger::UNKNOWN, MintLogger::VERBOSE, MintLogger::WARN

Instance Attribute Summary collapse

Attributes included from Mixins::Properties

#autopush_set_cache, #dynamic_create, #harvest_on_access, #harvest_undefined_only, #harvested, #tree_root

Attributes included from OtdCommon

#harvested

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Mixins::Properties

#[], #[]=, #add_validate_report_result, #armour_set_property, #array_contains?, #array_is_a?, #check_autopush, #check_stack_overflow, #clone_property_object, #cloner_handle_single_property, #coerce_single, #contains_as_string?, #display_validate_report_result, #double_initialize?, #dump_to_hash, #find_parent, #find_parent_by_identity, #generate_accessor_functions, #get_canonical_renamed, #get_from_opts, #get_my_name, #get_property, #get_property_item, #has?, included, #initialize_validate_report, #inspect, #is_cloned_object?, #is_mintpress_object?, #is_probably_canonical?, #is_set?, #local_debug, #local_info, #local_verbose, #mintpress_property_definitions, #place_object_by_identity, #process_properties, #prop_set?, #property, #property_definitions, #property_details, #property_is_simple_object?, #push_root!, #require_property, #require_update, #retrieve_docstring, #sanitize, #set_map_dirty, #set_property, #set_property_item, #show_short_array, #strip_defaults!, #synchronize, #uncloned_property_definitions, #update_map, #validate, #validate_generic, #validate_properties, #validate_property, #validate_required, #version_allowed?, #weakref

Methods included from MintLogger::Utils::Common

#boolean_val, #has_value?, #no_value?, #nvl, #path_as_symbol, #ruby_level_to_send

Methods included from OtdCommon

#can_exist?, #creator_available?, #delete_generic, #delete_props, #destroy_generic, #disable_props, #empty_mbean?, #enable_prop_generic, #enable_props, #exist_generic?, #form_props, #get_domain, #get_property_from_target, #get_props, #handle_type, #harvest, #harvesters, #harvesting, #list_generic, #list_props, #otd_create_generic, #otd_propize, #set_prop_generic, #set_props

Constructor Details

#initialize(opts = {}) ⇒ OriginServer

Returns a new instance of OriginServer.

Instance Attribute Details

#get_paramsObject

Returns the value of attribute get_params.

#list_paramsObject

Returns the value of attribute list_params.

#model_parentsObject

Returns the value of attribute model_parents.

Class Method Details

.drain_server_set(origin_server_set, timeout: nil) ⇒ Object

This static function drains a set of OTD servers from an array - optionally, with a timeout. It is the equalivate of calling start_draining then disable_when_drained on eache one, but wrapped in a convinience function

Instance Method Details

#createObject

#destroyObject

#disableObject

disable an origin server immediatly

#disable_when_drainedObject

This action should be called after start_draining, and will return when the origin server is completly drained of connections

#enableObject

Enable an origin server immediatly

#exist?Boolean

Returns:

  • (Boolean)

#get_metric(metric_list, jython_type: 'int') ⇒ Object

This function returns the metrics in metric_list.

#start_drainingObject

This action should be called to start an origin server draining - you generally want to follow it with a call to `disable_when_drained`. The reason why they're seperated, is because you can/should start _all_ of your origin servers that you want to pull down draining, then wait on them all, that way they drain in parallel (this makes sense when you've got 3 or 4 different port listeners on a single server!)

#stateObject