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

#include <lifetime.h>

Inheritance diagram for LifetimeActor:
Collaboration diagram for LifetimeActor:

Public Member Functions

 LifetimeActor (LifetimeManager *manager)
 
virtual ~LifetimeActor ()
 
virtual void Delete ()
 
void RetryDelete ()
 
void PauseDelete ()
 
void ResumeDelete ()
 
bool IsDeleted () const
 
bool HasDependents () const
 
bool HasRefcount () const
 
const uint64_t create_time_stamp_usecs () const
 
const uint64_t delete_time_stamp_usecs () const
 

Private Types

typedef DependencyList
< LifetimeRefBase,
LifetimeActor
Dependents
 

Private Member Functions

virtual bool MayDelete () const =0
 
virtual void Shutdown ()
 
virtual void DeleteComplete ()
 
virtual void Destroy ()=0
 
void PropagateDelete ()
 
void DependencyAdd (DependencyRef< LifetimeRefBase, LifetimeActor > *node)
 
void DependencyRemove (DependencyRef< LifetimeRefBase, LifetimeActor > *node)
 
void ReferenceIncrement ()
 
bool ReferenceDecrementAndTest ()
 
bool shutdown_invoked ()
 
void set_shutdown_invoked ()
 
 DISALLOW_COPY_AND_ASSIGN (LifetimeActor)
 

Private Attributes

tbb::mutex mutex_
 
LifetimeManagermanager_
 
tbb::atomic< bool > deleted_
 
int refcount_
 
bool shutdown_invoked_
 
bool delete_paused_
 
uint64_t create_time_stamp_usecs_
 
uint64_t delete_time_stamp_usecs_
 
Dependents dependents_
 

Friends

class DependencyRef< LifetimeRefBase, LifetimeActor >
 
class LifetimeManager
 

Detailed Description

Definition at line 116 of file lifetime.h.

Member Typedef Documentation

Constructor & Destructor Documentation

LifetimeActor::LifetimeActor ( LifetimeManager manager)

Definition at line 18 of file lifetime.cc.

LifetimeActor::~LifetimeActor ( )
virtual

Definition at line 26 of file lifetime.cc.

Here is the call graph for this function:

Member Function Documentation

const uint64_t LifetimeActor::create_time_stamp_usecs ( ) const
inline

Definition at line 135 of file lifetime.h.

void LifetimeActor::Delete ( )
virtual

Definition at line 38 of file lifetime.cc.

Here is the call graph for this function:

const uint64_t LifetimeActor::delete_time_stamp_usecs ( ) const
inline

Definition at line 138 of file lifetime.h.

void LifetimeActor::DeleteComplete ( )
privatevirtual

Definition at line 81 of file lifetime.cc.

void LifetimeActor::DependencyAdd ( DependencyRef< LifetimeRefBase, LifetimeActor > *  node)
private

Definition at line 126 of file lifetime.cc.

Here is the call graph for this function:

void LifetimeActor::DependencyRemove ( DependencyRef< LifetimeRefBase, LifetimeActor > *  node)
private

Definition at line 140 of file lifetime.cc.

Here is the call graph for this function:

LifetimeActor::DISALLOW_COPY_AND_ASSIGN ( LifetimeActor  )
private
bool LifetimeActor::HasDependents ( ) const
inline

Definition at line 132 of file lifetime.h.

Here is the call graph for this function:

bool LifetimeActor::HasRefcount ( ) const
inline

Definition at line 133 of file lifetime.h.

bool LifetimeActor::IsDeleted ( ) const
inline

Definition at line 131 of file lifetime.h.

void LifetimeActor::PauseDelete ( )

Definition at line 101 of file lifetime.cc.

void LifetimeActor::PropagateDelete ( )
private

Definition at line 57 of file lifetime.cc.

Here is the call graph for this function:

bool LifetimeActor::ReferenceDecrementAndTest ( )
private

Definition at line 158 of file lifetime.cc.

Here is the call graph for this function:

void LifetimeActor::ReferenceIncrement ( )
private

Definition at line 153 of file lifetime.cc.

void LifetimeActor::ResumeDelete ( )

Definition at line 113 of file lifetime.cc.

Here is the call graph for this function:

void LifetimeActor::RetryDelete ( )

Definition at line 71 of file lifetime.cc.

Here is the call graph for this function:

void LifetimeActor::set_shutdown_invoked ( )
inlineprivate

Definition at line 167 of file lifetime.h.

bool LifetimeActor::shutdown_invoked ( )
inlineprivate

Definition at line 166 of file lifetime.h.

Friends And Related Function Documentation

friend class DependencyRef< LifetimeRefBase, LifetimeActor >
friend

Definition at line 144 of file lifetime.h.

friend class LifetimeManager
friend

Definition at line 145 of file lifetime.h.

Member Data Documentation

uint64_t LifetimeActor::create_time_stamp_usecs_
private

Definition at line 175 of file lifetime.h.

bool LifetimeActor::delete_paused_
private

Definition at line 174 of file lifetime.h.

uint64_t LifetimeActor::delete_time_stamp_usecs_
private

Definition at line 176 of file lifetime.h.

tbb::atomic<bool> LifetimeActor::deleted_
private

Definition at line 171 of file lifetime.h.

Dependents LifetimeActor::dependents_
private

Definition at line 177 of file lifetime.h.

LifetimeManager* LifetimeActor::manager_
private

Definition at line 170 of file lifetime.h.

tbb::mutex LifetimeActor::mutex_
private

Definition at line 169 of file lifetime.h.

int LifetimeActor::refcount_
private

Definition at line 172 of file lifetime.h.

bool LifetimeActor::shutdown_invoked_
private

Definition at line 173 of file lifetime.h.


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