A brief file description. More...
#include "P_EventSystem.h"
#include "MT_hashtable.h"
#include "ControlMatcher.h"
Go to the source code of this file.
Data Structures | |
struct | CongestRequestParam |
class | CongestionDB |
Typedefs | |
typedef MTHashTable< uint64_t, CongestionEntry * > | CongestionTable |
typedef HashTableIteratorState < uint64_t, CongestionEntry * > | Iter |
Functions | |
Action * | get_congest_entry (Continuation *cont, HttpRequestData *data, CongestionEntry **ppEntry) |
Action * | get_congest_list (Continuation *cont, MIOBuffer *buffer, int format=0) |
void | remove_all_congested_entry (void) |
void | remove_congested_entry (uint64_t key) |
void | remove_congested_entry (char *buf, MIOBuffer *out_buffer) |
void | revalidateCongestionDB () |
void | initCongestionDB () |
Variables | |
CongestionDB * | theCongestionDB |
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 CongestionDB.h.
typedef MTHashTable<uint64_t, CongestionEntry *> CongestionTable |
Definition at line 44 of file CongestionDB.h.
typedef HashTableIteratorState<uint64_t, CongestionEntry *> Iter |
Definition at line 47 of file CongestionDB.h.
Action* get_congest_entry | ( | Continuation * | cont, | |
HttpRequestData * | data, | |||
CongestionEntry ** | ppEntry | |||
) |
Definition at line 468 of file CongestionDB.cc.
References ats_ip_copy(), congestionControlEnabled, CongestionControlled(), CongestionDBContAllocator, Debug, ET_NET, eventProcessor, CongestionControlRecord::get(), CongestionEntry::get(), CongestionDBCont::get_congest_entry(), HttpRequestData::get_host(), HttpRequestData::get_ip(), MTHashTable< key_t, data_t >::insert_entry(), ControlBase::line_num, MTHashTable< key_t, data_t >::lock_for_key(), MTHashTable< key_t, data_t >::lookup_entry(), CongestionDBCont::m_action, make_key(), CongestionControlRecord::max_connection, CongestionControlRecord::max_connection_failures, Continuation::mutex, MUTEX_TRY_LOCK, MTHashTable< key_t, data_t >::part_num(), CongestionDB::RunTodoList(), SCHEDULE_CONGEST_CONT_INTERVAL, EventProcessor::schedule_in(), SET_CONTINUATION_HANDLER, and this_ethread().
Action* get_congest_list | ( | Continuation * | cont, | |
MIOBuffer * | buffer, | |||
int | format = 0 | |||
) |
Definition at line 521 of file CongestionDB.cc.
References CongestionEntry::congested(), congestionControlEnabled, CongestionDBContAllocator, ET_NET, eventProcessor, MTHashTable< key_t, data_t >::first_entry(), CongestionDBCont::get_congest_list(), MTHashTable< key_t, data_t >::getSize(), MTHashTable< key_t, data_t >::lock_for_key(), CongestionDBCont::m_action, CongestionControlRecord::max_connection, Continuation::mutex, MUTEX_TRY_LOCK, MTHashTable< key_t, data_t >::next_entry(), CongestionEntry::pRecord, CongestionDB::RunTodoList(), SCHEDULE_CONGEST_CONT_INTERVAL, EventProcessor::schedule_in(), SET_CONTINUATION_HANDLER, CongestionEntry::sprint(), this_ethread(), and MIOBuffer::write().
void initCongestionDB | ( | ) |
Definition at line 434 of file CongestionDB.cc.
References CONGESTION_DB_SIZE, and MT_HASHTABLE_PARTITIONS.
void remove_all_congested_entry | ( | void | ) |
Definition at line 565 of file CongestionDB.cc.
References CongestionDB::removeAllRecords().
void remove_congested_entry | ( | uint64_t | key | ) |
Definition at line 573 of file CongestionDB.cc.
References CongestionDB::removeRecord().
void remove_congested_entry | ( | char * | buf, | |
MIOBuffer * | out_buffer | |||
) |
Definition at line 591 of file CongestionDB.cc.
References ats_ip_pton(), ats_is_ip(), make_key(), remove_all_congested_entry(), remove_congested_entry(), IpEndpoint::sa, and MIOBuffer::write().
void revalidateCongestionDB | ( | ) |
Definition at line 442 of file CongestionDB.cc.
References CONGESTION_DB_SIZE, CongestRequestParamAllocator, Debug, MTHashTable< key_t, data_t >::getSize(), ink_atomiclist_push(), MTHashTable< key_t, data_t >::lock_for_key(), CongestRequestParam::m_op, MT_HASHTABLE_PARTITIONS, MUTEX_TRY_LOCK, CongestionDB::revalidateBucket(), CongestionDB::RunTodoList(), this_ethread(), and CongestionDB::todo_lists.
Referenced by CongestionControlEnabledChanged(), and CongestionMatcherTable::reconfigure().
Definition at line 41 of file CongestionDB.cc.