Declared in module Chainer
Chainer.FailoverChainer
Chainer.Chainer
class FailoverChainer(Chainer): def Chainer.FailoverChainer.__init__(self, hosts, local=None, forge_addr=0) # Initializes an instance of FailoverChainer def Chainer.FailoverChainer.connectServer(self, session, host, port) # Called by the proxy to connect to the remote server. def Chainer.FailoverChainer.getHostAddress(self) # Returns the actual host to try def Chainer.FailoverChainer.nextHost(self) # Finds the next host to try # Inherited from Chainer.Chainer def Chainer.Chainer.connectServer(self, session, host, port) # Connect to the targeted server. def Chainer.Chainer.establishConnection(self, session, local, remote) # Function to actually establish the connection.
Failover chainer tries to connect several hosts until one of them succeeds.
Initializes an instance of FailoverChainer
Called by the proxy to connect to the remote server.
Tries to connect to each host round-robin until one of them succeeds.Returns the actual host to try
Finds the next host to try
Increments the index (current_host), zeroes it if overflowed