OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
KSyncFlowEntryFreeList Class Reference

#include <flowtable_ksync.h>

Collaboration diagram for KSyncFlowEntryFreeList:

Public Types

typedef
boost::intrusive::member_hook
< FlowTableKSyncEntry,
boost::intrusive::list_member_hook
<>,&FlowTableKSyncEntry::free_list_node_
Node
 
typedef boost::intrusive::list
< FlowTableKSyncEntry, Node
FreeList
 

Public Member Functions

 KSyncFlowEntryFreeList (FlowTableKSyncObject *object)
 
 KSyncFlowEntryFreeList (FlowTableKSyncObject *object, FlowEntry *flow, uint32_t hash_id)
 
virtual ~KSyncFlowEntryFreeList ()
 
void Reset ()
 
void Reset (FlowEntryPtr fe, uint32_t hash_id)
 
FlowTableKSyncEntryAllocate (const KSyncEntry *key)
 
void Free (FlowTableKSyncEntry *flow)
 
void Grow ()
 
uint32_t max_count () const
 
uint32_t free_count () const
 
uint32_t alloc_count () const
 
uint32_t total_alloc () const
 
uint32_t total_free () const
 

Static Public Attributes

static const uint32_t kInitCount = (25 * 1000)
 
static const uint32_t kTestInitCount = (5 * 1000)
 
static const uint32_t kGrowSize = (1 * 1000)
 
static const uint32_t kMinThreshold = (4 * 1000)
 
static const uint32_t kMaxThreshold = (100 * 1000)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (KSyncFlowEntryFreeList)
 

Private Attributes

FlowTableKSyncObjectobject_
 
uint32_t max_count_
 
bool grow_pending_
 
uint64_t total_alloc_
 
uint64_t total_free_
 
FreeList free_list_
 

Detailed Description

Definition at line 172 of file flowtable_ksync.h.

Member Typedef Documentation

typedef boost::intrusive::list<FlowTableKSyncEntry, Node> KSyncFlowEntryFreeList::FreeList

Definition at line 183 of file flowtable_ksync.h.

typedef boost::intrusive::member_hook<FlowTableKSyncEntry, boost::intrusive::list_member_hook<>, &FlowTableKSyncEntry::free_list_node_> KSyncFlowEntryFreeList::Node

Definition at line 182 of file flowtable_ksync.h.

Constructor & Destructor Documentation

KSyncFlowEntryFreeList::KSyncFlowEntryFreeList ( FlowTableKSyncObject object)

Definition at line 732 of file flowtable_ksync.cc.

Here is the call graph for this function:

KSyncFlowEntryFreeList::KSyncFlowEntryFreeList ( FlowTableKSyncObject object,
FlowEntry flow,
uint32_t  hash_id 
)
KSyncFlowEntryFreeList::~KSyncFlowEntryFreeList ( )
virtual

Definition at line 746 of file flowtable_ksync.cc.

Member Function Documentation

uint32_t KSyncFlowEntryFreeList::alloc_count ( ) const
inline

Definition at line 198 of file flowtable_ksync.h.

FlowTableKSyncEntry * KSyncFlowEntryFreeList::Allocate ( const KSyncEntry key)

Definition at line 767 of file flowtable_ksync.cc.

Here is the call graph for this function:

KSyncFlowEntryFreeList::DISALLOW_COPY_AND_ASSIGN ( KSyncFlowEntryFreeList  )
private
void KSyncFlowEntryFreeList::Free ( FlowTableKSyncEntry flow)

Definition at line 793 of file flowtable_ksync.cc.

Here is the call graph for this function:

uint32_t KSyncFlowEntryFreeList::free_count ( ) const
inline

Definition at line 197 of file flowtable_ksync.h.

void KSyncFlowEntryFreeList::Grow ( )

Definition at line 756 of file flowtable_ksync.cc.

uint32_t KSyncFlowEntryFreeList::max_count ( ) const
inline

Definition at line 196 of file flowtable_ksync.h.

void KSyncFlowEntryFreeList::Reset ( )
void KSyncFlowEntryFreeList::Reset ( FlowEntryPtr  fe,
uint32_t  hash_id 
)
uint32_t KSyncFlowEntryFreeList::total_alloc ( ) const
inline

Definition at line 199 of file flowtable_ksync.h.

uint32_t KSyncFlowEntryFreeList::total_free ( ) const
inline

Definition at line 200 of file flowtable_ksync.h.

Member Data Documentation

FreeList KSyncFlowEntryFreeList::free_list_
private

Definition at line 208 of file flowtable_ksync.h.

bool KSyncFlowEntryFreeList::grow_pending_
private

Definition at line 205 of file flowtable_ksync.h.

const uint32_t KSyncFlowEntryFreeList::kGrowSize = (1 * 1000)
static

Definition at line 176 of file flowtable_ksync.h.

const uint32_t KSyncFlowEntryFreeList::kInitCount = (25 * 1000)
static

Definition at line 174 of file flowtable_ksync.h.

const uint32_t KSyncFlowEntryFreeList::kMaxThreshold = (100 * 1000)
static

Definition at line 178 of file flowtable_ksync.h.

const uint32_t KSyncFlowEntryFreeList::kMinThreshold = (4 * 1000)
static

Definition at line 177 of file flowtable_ksync.h.

const uint32_t KSyncFlowEntryFreeList::kTestInitCount = (5 * 1000)
static

Definition at line 175 of file flowtable_ksync.h.

uint32_t KSyncFlowEntryFreeList::max_count_
private

Definition at line 204 of file flowtable_ksync.h.

FlowTableKSyncObject* KSyncFlowEntryFreeList::object_
private

Definition at line 203 of file flowtable_ksync.h.

uint64_t KSyncFlowEntryFreeList::total_alloc_
private

Definition at line 206 of file flowtable_ksync.h.

uint64_t KSyncFlowEntryFreeList::total_free_
private

Definition at line 207 of file flowtable_ksync.h.


The documentation for this class was generated from the following files: