Data Structures | Defines | Functions | Variables

CongestionDB.cc File Reference

A brief file description. More...

#include "libts.h"
#include "P_EventSystem.h"
#include "P_Net.h"
#include "Main.h"
#include "CongestionDB.h"
#include "Congestion.h"
#include "ProcessManager.h"
Include dependency graph for CongestionDB.cc:

Go to the source code of this file.

Data Structures

class  CongestionDBCont

Defines

#define SCHEDULE_CONGEST_CONT_INTERVAL   HRTIME_MSECONDS(5)
#define CDBC_buf   data.list_info.m_iobuf
#define CDBC_pid   data.list_info.m_CurPartitionID
#define CDBC_lf   data.list_info.m_list_format
#define CDBC_key   data.entry_info.m_key
#define CDBC_host   data.entry_info.m_hostname
#define CDBC_ip   data.entry_info.m_ip
#define CDBC_rule   data.entry_info.m_rule
#define CDBC_ppE   data.entry_info.m_ppEntry

Functions

void Free_CongestionDBCont (CongestionDBCont *cont)
void Free_CongestRequestParam (CongestRequestParam *param)
void preCongestEntryGC (void)
bool congestEntryGC (CongestionEntry *p)
void initCongestionDB ()
void revalidateCongestionDB ()
Actionget_congest_entry (Continuation *cont, HttpRequestData *data, CongestionEntry **ppEntry)
Actionget_congest_list (Continuation *cont, MIOBuffer *buffer, int format)
void remove_all_congested_entry ()
void remove_congested_entry (uint64_t key)
void remove_congested_entry (char *buf, MIOBuffer *out_buffer)

Variables

int CONGESTION_DB_SIZE = 1024
CongestionDBtheCongestionDB = NULL
static ClassAllocator
< CongestionDBCont
CongestionDBContAllocator ("CongestionDBContAllocator")
ClassAllocator
< CongestRequestParam
CongestRequestParamAllocator ("CongestRequestParamAllocator")
static long congestEntryGCTime = 0

Detailed Description

A brief file description.

License

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.cc.


Define Documentation

#define CDBC_buf   data.list_info.m_iobuf

Definition at line 84 of file CongestionDB.cc.

Referenced by CongestionDBCont::get_congest_list().

#define CDBC_host   data.entry_info.m_hostname

Definition at line 88 of file CongestionDB.cc.

Referenced by CongestionDBCont::get_congest_entry().

#define CDBC_ip   data.entry_info.m_ip

Definition at line 89 of file CongestionDB.cc.

Referenced by CongestionDBCont::get_congest_entry().

#define CDBC_key   data.entry_info.m_key

Definition at line 87 of file CongestionDB.cc.

Referenced by CongestionDBCont::get_congest_entry().

#define CDBC_lf   data.list_info.m_list_format

Definition at line 86 of file CongestionDB.cc.

Referenced by CongestionDBCont::get_congest_list().

#define CDBC_pid   data.list_info.m_CurPartitionID

Definition at line 85 of file CongestionDB.cc.

Referenced by CongestionDBCont::GC(), and CongestionDBCont::get_congest_list().

#define CDBC_ppE   data.entry_info.m_ppEntry

Definition at line 91 of file CongestionDB.cc.

Referenced by CongestionDBCont::get_congest_entry().

#define CDBC_rule   data.entry_info.m_rule

Definition at line 90 of file CongestionDB.cc.

Referenced by CongestionDBCont::get_congest_entry().

#define SCHEDULE_CONGEST_CONT_INTERVAL   HRTIME_MSECONDS(5)

Function Documentation

bool congestEntryGC ( CongestionEntry p  ) 
void Free_CongestionDBCont ( CongestionDBCont cont  )  [inline]
void Free_CongestRequestParam ( CongestRequestParam param  )  [inline]

Definition at line 117 of file CongestionDB.cc.

References CongestRequestParamAllocator.

Referenced by CongestionDB::RunTodoList().

Action* get_congest_entry ( Continuation cont,
HttpRequestData data,
CongestionEntry **  ppEntry 
)
Action* get_congest_list ( Continuation cont,
MIOBuffer buffer,
int  format 
)
void initCongestionDB (  ) 

Definition at line 434 of file CongestionDB.cc.

References CONGESTION_DB_SIZE, and MT_HASHTABLE_PARTITIONS.

void preCongestEntryGC ( void   ) 

Definition at line 137 of file CongestionDB.cc.

References congestEntryGCTime, ink_get_hrtime(), and ink_hrtime_to_sec().

void remove_all_congested_entry ( void   ) 

Definition at line 565 of file CongestionDB.cc.

References CongestionDB::removeAllRecords().

Referenced by remove_congested_entry().

void remove_congested_entry ( uint64_t  key  ) 

Definition at line 573 of file CongestionDB.cc.

References CongestionDB::removeRecord().

Referenced by remove_congested_entry().

void remove_congested_entry ( char *  buf,
MIOBuffer out_buffer 
)
void revalidateCongestionDB (  ) 

Variable Documentation

long congestEntryGCTime = 0 [static]

Definition at line 130 of file CongestionDB.cc.

Referenced by congestEntryGC(), and preCongestEntryGC().

int CONGESTION_DB_SIZE = 1024

Definition at line 39 of file CongestionDB.cc.

Referenced by initCongestionDB(), and revalidateCongestionDB().

ClassAllocator< CongestionDBCont > CongestionDBContAllocator("CongestionDBContAllocator") [static]

Definition at line 41 of file CongestionDB.cc.