A brief file description. More...
#include "P_Cluster.h"
Go to the source code of this file.
Data Structures | |
struct | ConfigurationContinuation |
Typedefs | |
typedef int(ConfigurationContinuation::* | CfgContHandler )(int, void *) |
Functions | |
static void | make_cluster_connections (MachineList *l) |
int | machine_config_change (const char *, RecDataT, RecData data, void *cookie) |
void | do_machine_config_change (void *d, const char *s) |
static void | free_configuration (ClusterConfiguration *c, ClusterConfiguration *prev) |
ClusterConfiguration * | configuration_add_machine (ClusterConfiguration *c, ClusterMachine *m) |
ClusterConfiguration * | configuration_remove_machine (ClusterConfiguration *c, ClusterMachine *m) |
ClusterMachine * | cluster_machine_at_depth (unsigned int hash, int *pprobe_depth, ClusterMachine **past_probes) |
void | initialize_thread_for_cluster (EThread *e) |
Variables | |
int | cluster_port = DEFAULT_CLUSTER_PORT_NUMBER |
A brief file description.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file ClusterConfig.cc.
typedef int(ConfigurationContinuation::* CfgContHandler)(int, void *) |
Definition at line 242 of file ClusterConfig.cc.
ClusterMachine* cluster_machine_at_depth | ( | unsigned int | hash, | |
int * | pprobe_depth, | |||
ClusterMachine ** | past_probes | |||
) |
Definition at line 368 of file ClusterConfig.cc.
References cache_clustering_enabled, ClusterConfiguration::changed, CLUSTER_CONFIGURATION_TIMEOUT, CONFIGURATION_HISTORY_PROBE_DEPTH, Cluster::current_configuration(), ClusterMachine::dead, ink_get_hrtime(), ClusterConfiguration::machine_hash(), machine_in_vector(), ClusterConfiguration::machines, ClusterConfiguration::n_machines, this_cluster(), and this_cluster_machine().
Referenced by Cluster_lookup(), HostDBContinuation::clusterEvent(), HostDBContinuation::dnsEvent(), HostDBContinuation::do_get_response(), CacheContinuation::do_remote_lookup(), UpdateSM::HandleSMEvent(), CacheProcessor::open_write(), probe(), CacheContinuation::remoteOpEvent(), and CacheProcessor::remove().
ClusterConfiguration* configuration_add_machine | ( | ClusterConfiguration * | c, | |
ClusterMachine * | m | |||
) |
Definition at line 289 of file ClusterConfig.cc.
References build_cluster_hash_table(), ClusterConfiguration::changed, CLUSTER_CONFIGURATION_CHANGES_STAT, CLUSTER_INCREMENT_DYN_STAT, CLUSTER_MAX_MACHINES, free_configuration(), ink_assert, ink_get_hrtime(), ClusterMachine::ip, ClusterConfiguration::machines, Thread::mutex, ClusterConfiguration::n_machines, and this_ethread().
Referenced by ClusterHandler::startClusterEvent(), and test().
ClusterConfiguration* configuration_remove_machine | ( | ClusterConfiguration * | c, | |
ClusterMachine * | m | |||
) |
Definition at line 329 of file ClusterConfig.cc.
References build_cluster_hash_table(), ClusterConfiguration::changed, CLUSTER_CONFIGURATION_CHANGES_STAT, CLUSTER_INCREMENT_DYN_STAT, free_configuration(), ink_assert, ink_get_hrtime(), ClusterConfiguration::machines, Thread::mutex, ClusterConfiguration::n_machines, and this_ethread().
Referenced by ClusterHandler::machine_down().
void do_machine_config_change | ( | void * | d, | |
const char * | s | |||
) |
Definition at line 220 of file ClusterConfig.cc.
References machine_config_change(), REC_ReadConfigString, RecData::rec_string, and RECD_STRING.
Referenced by ClusterProcessor::start().
static void free_configuration | ( | ClusterConfiguration * | c, | |
ClusterConfiguration * | prev | |||
) | [static] |
Definition at line 275 of file ClusterConfig.cc.
References CLUSTER_CONFIGURATION_TIMEOUT, ET_CALL, eventProcessor, and EventProcessor::schedule_in().
Referenced by configuration_add_machine(), and configuration_remove_machine().
void initialize_thread_for_cluster | ( | EThread * | e | ) |
Definition at line 450 of file ClusterConfig.cc.
Definition at line 182 of file ClusterConfig.cc.
References cluster_config, CLUSTER_CONFIG, free_MachineList(), MACHINE_CONFIG, machines_config, make_cluster_connections(), read_MachineList(), and RecData::rec_string.
Referenced by do_machine_config_change(), and ClusterProcessor::start().
static void make_cluster_connections | ( | MachineList * | l | ) | [static] |
Definition at line 158 of file ClusterConfig.cc.
References clusterProcessor, ClusterProcessor::connect(), MachineListElement::ip, ClusterMachine::ip, MachineList::machine, MachineList::n, ClusterMachine::num_connections, MachineListElement::port, and this_cluster_machine().
Referenced by machine_config_change().
int cluster_port = DEFAULT_CLUSTER_PORT_NUMBER |
Definition at line 32 of file ClusterConfig.cc.
Referenced by ClusterAccept::ClusterAcceptEvent(), ClusterHandler::connectClusterEvent(), ClusterConfiguration::find(), ClusterProcessor::init(), ClusterProcessor::start(), and ClusterHandler::startClusterEvent().