OpenSDN source code
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< KSyncEntryKSyncEntryPtr
 

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

◆ KSyncEntryPtr

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

Definition at line 68 of file ksync_entry.h.

Member Enumeration Documentation

◆ KSyncEvent

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.

◆ KSyncState

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() [1/2]

KSyncEntry::KSyncEntry ( )
inline

Definition at line 73 of file ksync_entry.h.

Here is the call graph for this function:

◆ KSyncEntry() [2/2]

KSyncEntry::KSyncEntry ( uint32_t  index)
inline

Definition at line 77 of file ksync_entry.h.

Here is the call graph for this function:

◆ ~KSyncEntry()

virtual KSyncEntry::~KSyncEntry ( )
inlinevirtual

Definition at line 80 of file ksync_entry.h.

Member Function Documentation

◆ AckOperationString()

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:

◆ Add()

◆ AllowDeleteStateComp()

virtual bool KSyncEntry::AllowDeleteStateComp ( )
inlinevirtual

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

Definition at line 137 of file ksync_entry.h.

◆ Change()

◆ del_add_pending()

bool KSyncEntry::del_add_pending ( ) const
inline

Definition at line 158 of file ksync_entry.h.

◆ Delete()

◆ DISALLOW_COPY_AND_ASSIGN()

KSyncEntry::DISALLOW_COPY_AND_ASSIGN ( KSyncEntry  )
private

◆ ErrorHandler()

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:

◆ EventString()

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

Definition at line 628 of file ksync_object.cc.

◆ GetIndex()

size_t KSyncEntry::GetIndex ( ) const
inline

Definition at line 156 of file ksync_entry.h.

◆ GetObject()

◆ GetRefCount()

uint32_t KSyncEntry::GetRefCount ( ) const
inline

Definition at line 159 of file ksync_entry.h.

◆ GetState()

KSyncState KSyncEntry::GetState ( ) const
inline

Definition at line 157 of file ksync_entry.h.

◆ GetTableIndex()

virtual uint32_t KSyncEntry::GetTableIndex ( ) const
inlinevirtual

Reimplemented in FlowTableKSyncEntry.

Definition at line 152 of file ksync_entry.h.

◆ IsActive()

bool KSyncEntry::IsActive ( )
inline

Definition at line 172 of file ksync_entry.h.

Here is the call graph for this function:

◆ IsDataResolved()

virtual bool KSyncEntry::IsDataResolved ( )
inlinevirtual

◆ IsDeleted()

bool KSyncEntry::IsDeleted ( )
inline

Definition at line 163 of file ksync_entry.h.

◆ IsLess()

◆ IsResolved()

bool KSyncEntry::IsResolved ( )

Definition at line 504 of file ksync_object.cc.

Here is the call graph for this function:

◆ operator<()

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:

◆ pre_alloc_rx_buffer()

virtual bool KSyncEntry::pre_alloc_rx_buffer ( ) const
inlinevirtual

Reimplemented in FlowTableKSyncEntry.

Definition at line 149 of file ksync_entry.h.

◆ RecordTransition()

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:

◆ Reset() [1/2]

void KSyncEntry::Reset ( )
inline

Definition at line 82 of file ksync_entry.h.

◆ Reset() [2/2]

void KSyncEntry::Reset ( uint32_t  index)
inline

Definition at line 90 of file ksync_entry.h.

Here is the call graph for this function:

◆ Response()

virtual void KSyncEntry::Response ( )
inlinevirtual

Definition at line 134 of file ksync_entry.h.

◆ Seen()

bool KSyncEntry::Seen ( ) const
inline

Definition at line 160 of file ksync_entry.h.

◆ set_del_add_pending()

void KSyncEntry::set_del_add_pending ( bool  pending)
inline

Definition at line 174 of file ksync_entry.h.

◆ SetIndex()

void KSyncEntry::SetIndex ( size_t  index)
inlineprotected

Definition at line 180 of file ksync_entry.h.

◆ SetSeen()

void KSyncEntry::SetSeen ( )
inline

Definition at line 162 of file ksync_entry.h.

◆ SetState()

void KSyncEntry::SetState ( KSyncState  state)
inlineprotected

Definition at line 181 of file ksync_entry.h.

◆ ShouldReEvalBackReference()

virtual bool KSyncEntry::ShouldReEvalBackReference ( ) const
inlinevirtual

Reimplemented in FlowTableKSyncEntry.

Definition at line 125 of file ksync_entry.h.

◆ stale()

bool KSyncEntry::stale ( ) const
inline

Definition at line 161 of file ksync_entry.h.

◆ StaleTimerExpired()

virtual void KSyncEntry::StaleTimerExpired ( )
inlinevirtual

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

Definition at line 154 of file ksync_entry.h.

◆ StateString()

std::string KSyncEntry::StateString ( ) const

Definition at line 562 of file ksync_object.cc.

◆ ToString()

◆ UnresolvedReference()

◆ VrouterError()

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:

◆ VrouterErrorToString()

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

Definition at line 513 of file ksync_object.cc.

Friends And Related Function Documentation

◆ intrusive_ptr_add_ref

void intrusive_ptr_add_ref ( KSyncEntry p)
friend

Definition at line 670 of file ksync_object.cc.

◆ intrusive_ptr_release

void intrusive_ptr_release ( KSyncEntry p)
friend

Definition at line 678 of file ksync_object.cc.

◆ KSyncObject

friend class KSyncObject
friend

Definition at line 186 of file ksync_entry.h.

◆ KSyncSock

friend class KSyncSock
friend

Definition at line 185 of file ksync_entry.h.

Member Data Documentation

◆ del_add_pending_

bool KSyncEntry::del_add_pending_
private

Definition at line 202 of file ksync_entry.h.

◆ index_

size_t KSyncEntry::index_
private

Definition at line 190 of file ksync_entry.h.

◆ kDefaultMsgSize

const int KSyncEntry::kDefaultMsgSize = 512
static

Definition at line 70 of file ksync_entry.h.

◆ kInvalidIndex

const size_t KSyncEntry::kInvalidIndex = 0xFFFFFFFF
static

Definition at line 69 of file ksync_entry.h.

◆ node_

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

Definition at line 188 of file ksync_entry.h.

◆ refcount_

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

Definition at line 192 of file ksync_entry.h.

◆ seen_

bool KSyncEntry::seen_
private

Definition at line 193 of file ksync_entry.h.

◆ stale_

bool KSyncEntry::stale_
private

Definition at line 197 of file ksync_entry.h.

◆ state_

KSyncState KSyncEntry::state_
private

Definition at line 191 of file ksync_entry.h.

◆ t_history_

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: