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

#include <ksync_entry.h>

Inheritance diagram for KSyncEntry:
Collaboration diagram for KSyncEntry:

Classes

class  KSyncEntryTransHistory
 
struct  KSyncEntryTransition
 

Public Types

enum  KSyncState {
  INIT, TEMP, ADD_DEFER, CHANGE_DEFER,
  IN_SYNC, SYNC_WAIT, NEED_SYNC, DEL_DEFER_SYNC,
  DEL_DEFER_REF, DEL_DEFER_DEL_ACK, DEL_ACK_WAIT, RENEW_WAIT,
  FREE_WAIT
}
 
enum  KSyncEvent {
  ADD_CHANGE_REQ, ADD_ACK, CHANGE_ACK, DEL_REQ,
  DEL_ADD_REQ, DEL_ACK, RE_EVAL, INT_PTR_REL,
  INVALID
}
 
typedef boost::intrusive_ptr
< KSyncEntry
KSyncEntryPtr
 

Public Member Functions

std::string StateString () const
 
std::string AckOperationString (KSyncEvent ack_event) const
 
std::string EventString (KSyncEvent event) const
 
 KSyncEntry ()
 
 KSyncEntry (uint32_t index)
 
virtual ~KSyncEntry ()
 
void Reset ()
 
void Reset (uint32_t index)
 
bool operator< (const KSyncEntry &rhs) const
 
virtual bool IsLess (const KSyncEntry &rhs) const =0
 
virtual std::string ToString () const =0
 
virtual bool Add ()=0
 
virtual bool Change ()=0
 
virtual bool Delete ()=0
 
virtual KSyncObjectGetObject () const =0
 
virtual KSyncEntryUnresolvedReference ()=0
 
virtual bool ShouldReEvalBackReference () const
 
bool IsResolved ()
 
virtual bool IsDataResolved ()
 
virtual void Response ()
 
virtual bool AllowDeleteStateComp ()
 
virtual void ErrorHandler (int err, uint32_t seqno, KSyncEvent event) const
 
virtual std::string VrouterError (uint32_t error) const
 
virtual bool pre_alloc_rx_buffer () const
 
virtual uint32_t GetTableIndex () const
 
virtual void StaleTimerExpired ()
 
size_t GetIndex () const
 
KSyncState GetState () const
 
bool del_add_pending () const
 
uint32_t GetRefCount () const
 
bool Seen () const
 
bool stale () const
 
void SetSeen ()
 
bool IsDeleted ()
 
bool IsActive ()
 
void set_del_add_pending (bool pending)
 
void RecordTransition (KSyncState from, KSyncState to, KSyncEvent event)
 

Static Public Member Functions

static std::string VrouterErrorToString (uint32_t error)
 

Static Public Attributes

static const size_t kInvalidIndex = 0xFFFFFFFF
 
static const int kDefaultMsgSize = 512
 

Protected Member Functions

void SetIndex (size_t index)
 
void SetState (KSyncState state)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (KSyncEntry)
 

Private Attributes

boost::intrusive::set_member_hook node_
 
size_t index_
 
KSyncState state_
 
tbb::atomic< int > refcount_
 
bool seen_
 
bool stale_
 
bool del_add_pending_
 
KSyncEntryTransHistory t_history_
 

Friends

class KSyncSock
 
class KSyncObject
 
void intrusive_ptr_add_ref (KSyncEntry *p)
 
void intrusive_ptr_release (KSyncEntry *p)
 

Detailed Description

Definition at line 33 of file ksync_entry.h.

Member Typedef Documentation

typedef boost::intrusive_ptr<KSyncEntry> KSyncEntry::KSyncEntryPtr

Definition at line 68 of file ksync_entry.h.

Member Enumeration Documentation

Enumerator
ADD_CHANGE_REQ 
ADD_ACK 
CHANGE_ACK 
DEL_REQ 
DEL_ADD_REQ 
DEL_ACK 
RE_EVAL 
INT_PTR_REL 
INVALID 

Definition at line 51 of file ksync_entry.h.

Enumerator
INIT 
TEMP 
ADD_DEFER 
CHANGE_DEFER 
IN_SYNC 
SYNC_WAIT 
NEED_SYNC 
DEL_DEFER_SYNC 
DEL_DEFER_REF 
DEL_DEFER_DEL_ACK 
DEL_ACK_WAIT 
RENEW_WAIT 
FREE_WAIT 

Definition at line 35 of file ksync_entry.h.

Constructor & Destructor Documentation

KSyncEntry::KSyncEntry ( )
inline

Definition at line 73 of file ksync_entry.h.

Here is the call graph for this function:

KSyncEntry::KSyncEntry ( uint32_t  index)
inline

Definition at line 77 of file ksync_entry.h.

Here is the call graph for this function:

virtual KSyncEntry::~KSyncEntry ( )
inlinevirtual

Definition at line 80 of file ksync_entry.h.

Member Function Documentation

std::string KSyncEntry::AckOperationString ( KSyncEvent  ack_event) const

Definition at line 544 of file ksync_object.cc.

Here is the call graph for this function:

virtual bool KSyncEntry::AllowDeleteStateComp ( )
inlinevirtual

Reimplemented in FlowTableKSyncEntry, OVSDB::OvsdbDBEntry, and KSyncNetlinkEntry.

Definition at line 137 of file ksync_entry.h.

bool KSyncEntry::del_add_pending ( ) const
inline

Definition at line 158 of file ksync_entry.h.

KSyncEntry::DISALLOW_COPY_AND_ASSIGN ( KSyncEntry  )
private
void KSyncEntry::ErrorHandler ( int  err,
uint32_t  seqno,
KSyncEvent  event 
) const
virtual

Reimplemented in FlowTableKSyncEntry.

Definition at line 525 of file ksync_object.cc.

Here is the call graph for this function:

std::string KSyncEntry::EventString ( KSyncEvent  event) const

Definition at line 628 of file ksync_object.cc.

size_t KSyncEntry::GetIndex ( ) const
inline

Definition at line 156 of file ksync_entry.h.

uint32_t KSyncEntry::GetRefCount ( ) const
inline

Definition at line 159 of file ksync_entry.h.

KSyncState KSyncEntry::GetState ( ) const
inline

Definition at line 157 of file ksync_entry.h.

virtual uint32_t KSyncEntry::GetTableIndex ( ) const
inlinevirtual

Reimplemented in FlowTableKSyncEntry.

Definition at line 152 of file ksync_entry.h.

bool KSyncEntry::IsActive ( )
inline

Definition at line 172 of file ksync_entry.h.

Here is the call graph for this function:

virtual bool KSyncEntry::IsDataResolved ( )
inlinevirtual
bool KSyncEntry::IsDeleted ( )
inline

Definition at line 163 of file ksync_entry.h.

bool KSyncEntry::IsResolved ( )

Definition at line 504 of file ksync_object.cc.

Here is the call graph for this function:

bool KSyncEntry::operator< ( const KSyncEntry rhs) const
inline

Definition at line 96 of file ksync_entry.h.

Here is the call graph for this function:

virtual bool KSyncEntry::pre_alloc_rx_buffer ( ) const
inlinevirtual

Reimplemented in FlowTableKSyncEntry.

Definition at line 149 of file ksync_entry.h.

void KSyncEntry::RecordTransition ( KSyncState  from,
KSyncState  to,
KSyncEvent  event 
)
inline

Definition at line 175 of file ksync_entry.h.

Here is the call graph for this function:

void KSyncEntry::Reset ( )
inline

Definition at line 82 of file ksync_entry.h.

void KSyncEntry::Reset ( uint32_t  index)
inline

Definition at line 90 of file ksync_entry.h.

Here is the call graph for this function:

virtual void KSyncEntry::Response ( )
inlinevirtual

Definition at line 134 of file ksync_entry.h.

bool KSyncEntry::Seen ( ) const
inline

Definition at line 160 of file ksync_entry.h.

void KSyncEntry::set_del_add_pending ( bool  pending)
inline

Definition at line 174 of file ksync_entry.h.

void KSyncEntry::SetIndex ( size_t  index)
inlineprotected

Definition at line 180 of file ksync_entry.h.

void KSyncEntry::SetSeen ( )
inline

Definition at line 162 of file ksync_entry.h.

void KSyncEntry::SetState ( KSyncState  state)
inlineprotected

Definition at line 181 of file ksync_entry.h.

virtual bool KSyncEntry::ShouldReEvalBackReference ( ) const
inlinevirtual

Reimplemented in FlowTableKSyncEntry.

Definition at line 125 of file ksync_entry.h.

bool KSyncEntry::stale ( ) const
inline

Definition at line 161 of file ksync_entry.h.

virtual void KSyncEntry::StaleTimerExpired ( )
inlinevirtual

Reimplemented in OVSDB::LogicalSwitchEntry, and OVSDB::OvsdbDBEntry.

Definition at line 154 of file ksync_entry.h.

std::string KSyncEntry::StateString ( ) const

Definition at line 562 of file ksync_object.cc.

std::string KSyncEntry::VrouterError ( uint32_t  error) const
virtual

Reimplemented in FlowTableKSyncEntry.

Definition at line 521 of file ksync_object.cc.

Here is the call graph for this function:

std::string KSyncEntry::VrouterErrorToString ( uint32_t  error)
static

Definition at line 513 of file ksync_object.cc.

Friends And Related Function Documentation

void intrusive_ptr_add_ref ( KSyncEntry p)
friend

Definition at line 670 of file ksync_object.cc.

void intrusive_ptr_release ( KSyncEntry p)
friend

Definition at line 678 of file ksync_object.cc.

friend class KSyncObject
friend

Definition at line 186 of file ksync_entry.h.

friend class KSyncSock
friend

Definition at line 185 of file ksync_entry.h.

Member Data Documentation

bool KSyncEntry::del_add_pending_
private

Definition at line 202 of file ksync_entry.h.

size_t KSyncEntry::index_
private

Definition at line 190 of file ksync_entry.h.

const int KSyncEntry::kDefaultMsgSize = 512
static

Definition at line 70 of file ksync_entry.h.

const size_t KSyncEntry::kInvalidIndex = 0xFFFFFFFF
static

Definition at line 69 of file ksync_entry.h.

boost::intrusive::set_member_hook KSyncEntry::node_
private

Definition at line 188 of file ksync_entry.h.

tbb::atomic<int> KSyncEntry::refcount_
private

Definition at line 192 of file ksync_entry.h.

bool KSyncEntry::seen_
private

Definition at line 193 of file ksync_entry.h.

bool KSyncEntry::stale_
private

Definition at line 197 of file ksync_entry.h.

KSyncState KSyncEntry::state_
private

Definition at line 191 of file ksync_entry.h.

KSyncEntryTransHistory KSyncEntry::t_history_
private

Definition at line 230 of file ksync_entry.h.


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