GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Search::Elasticsearch::Role::CxnPool(3) User Contributed Perl Documentation Search::Elasticsearch::Role::CxnPool(3)

Search::Elasticsearch::Role::CxnPool - Provides common functionality to the CxnPool implementations

version 6.00

See the CxnPool implementations:
  • Search::Elasticsearch::CxnPool::Static
  • Search::Elasticsearch::CxnPool::Sniff
  • Search::Elasticsearch::CxnPool::Static::NoPing

These configuration options should not be set by the user but are documented here for completeness.

By default, the order of cxns passed to "set_cxns()" is randomized before they are stored. Set "randomize_cxns" to a false value to disable.

    $factory = $cxn_pool->cxn_factory

Returns the Search::Elasticsearch::Cxn::Factory object for creating a new $cxn instance.

    $logger = $cxn_pool->logger

Returns the Search::Elasticsearch::Role::Logger-based object, which defaults to Search::Elasticsearch::Logger::LogAny.

    $serializer = $cxn_pool->serializer

Returns the Search::Elasticsearch::Role::Serializer-based object, which defaults to Search::Elasticsearch::Serializer::JSON.

    $num = $cxn_pool->current_cxn_num

Returns the current cxn number, which is an offset into the array of cxns set by "set_cxns()".

    \@cxns = $cxn_pool->cxns;

Returns the current list of Search::Elasticsearch::Role::Cxn-based cxn objects as set by "set_cxns()".

    \@seed_nodes = $cxn_pool->seed_nodes

Returns the list of "nodes" originally specified when calling "new()" in Search::Elasticsearch.

    $num = $cxn_pool->next_cxn_num;

Returns the number of the next connection, in round-robin fashion. Updates the "current_cxn_num()".

    $cxn_pool->set_cxns(@nodes);

Takes a list of nodes, converts them into Search::Elasticsearch::Role::Cxn-based objects and makes them accessible via "cxns()".

    $cxn_pool->request_ok($cxn);

Called when a request by the specified $cxn object has completed successfully. Marks the $cxn as live.

    $should_retry = $cxn_pool->request_failed($cxn,$error);

Called when a request by the specified $cxn object has failed. Returns 1 if the request should be retried or 0 if it shouldn't.

    $bool = $cxn_pool->should_retry($error);

Examines the error to decide whether the request should be retried or not. By default, only "Search::Elasticsearch::Error::Cxn" in Search::Elasticsearch::Error errors are retried.

    $bool = $cxn_pool->should_mark_dead($error);

Examines the error to decide whether the $cxn should be marked as dead or not. By default, only "Search::Elasticsearch::Error::Cxn" in Search::Elasticsearch::Error errors cause a $cxn to be marked as dead.

    $str = $cxn_pool->cxns_str

Returns all "cxns()" as a string for logging purposes.

    $str = $cxn_pool->cxns_seeeds_str

Returns all "cxns()" and "seed_nodes()" as a string for logging purposes.

    $retries = $cxn_pool->retries

The number of times the current request has been retried.

    $cxn_pool->reset_retries;

Called at the start of a new request to reset the retries count.

Clinton Gormley <drtech@cpan.org>

This software is Copyright (c) 2017 by Elasticsearch BV.

This is free software, licensed under:

  The Apache License, Version 2.0, January 2004
2017-11-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.