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

#include <flow_token.h>

Inheritance diagram for TokenPool:
Collaboration diagram for TokenPool:

Public Member Functions

 TokenPool (const std::string &name, Proto *proto, int count)
 
virtual ~TokenPool ()
 
virtual TokenPtr GetToken ()
 
int token_count () const
 
bool TokenCheck () const
 
uint64_t failures () const
 
void IncrementRestarts ()
 
uint64_t restarts () const
 

Protected Member Functions

void FreeToken ()
 
 DISALLOW_COPY_AND_ASSIGN (TokenPool)
 

Protected Attributes

std::string name_
 
int max_tokens_
 
int min_tokens_
 
int low_water_mark_
 
tbb::atomic< int > token_count_
 
uint64_t failures_
 
uint64_t restarts_
 
Protoproto_
 

Friends

class Token
 

Detailed Description

Definition at line 25 of file flow_token.h.

Constructor & Destructor Documentation

TokenPool::TokenPool ( const std::string &  name,
Proto proto,
int  count 
)

Definition at line 13 of file flow_token.cc.

TokenPool::~TokenPool ( )
virtual

Definition at line 21 of file flow_token.cc.

Member Function Documentation

TokenPool::DISALLOW_COPY_AND_ASSIGN ( TokenPool  )
protected
uint64_t TokenPool::failures ( ) const
inline

Definition at line 33 of file flow_token.h.

void TokenPool::FreeToken ( )
protected

Definition at line 24 of file flow_token.cc.

Here is the call graph for this function:

TokenPtr TokenPool::GetToken ( )
virtual

Definition at line 41 of file flow_token.cc.

void TokenPool::IncrementRestarts ( )
inline

Definition at line 34 of file flow_token.h.

uint64_t TokenPool::restarts ( ) const
inline

Definition at line 35 of file flow_token.h.

int TokenPool::token_count ( ) const
inline

Definition at line 31 of file flow_token.h.

bool TokenPool::TokenCheck ( ) const

Definition at line 32 of file flow_token.cc.

Friends And Related Function Documentation

friend class Token
friend

Definition at line 37 of file flow_token.h.

Member Data Documentation

uint64_t TokenPool::failures_
mutableprotected

Definition at line 47 of file flow_token.h.

int TokenPool::low_water_mark_
protected

Definition at line 45 of file flow_token.h.

int TokenPool::max_tokens_
protected

Definition at line 43 of file flow_token.h.

int TokenPool::min_tokens_
protected

Definition at line 44 of file flow_token.h.

std::string TokenPool::name_
protected

Definition at line 42 of file flow_token.h.

Proto* TokenPool::proto_
protected

Definition at line 49 of file flow_token.h.

uint64_t TokenPool::restarts_
protected

Definition at line 48 of file flow_token.h.

tbb::atomic<int> TokenPool::token_count_
protected

Definition at line 46 of file flow_token.h.


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