#include <CEC_ProxyPushConsumer.h>
Collaboration diagram for TAO_CEC_ProxyPushConsumer_Guard:
Public Member Functions | |
TAO_CEC_ProxyPushConsumer_Guard (ACE_Lock *lock, CORBA::ULong &refcount, TAO_CEC_EventChannel *ec, TAO_CEC_ProxyPushConsumer *proxy) | |
Constructor. | |
~TAO_CEC_ProxyPushConsumer_Guard (void) | |
Destructor. | |
bool | locked (void) const |
Returns true if the reference count successfully acquired. | |
Private Attributes | |
ACE_Lock * | lock_ |
The lock used to protect the reference count. | |
CORBA::ULong & | refcount_ |
The reference count. | |
TAO_CEC_EventChannel * | event_channel_ |
The event channel used to destroy the proxy. | |
TAO_CEC_ProxyPushConsumer * | proxy_ |
The proxy whose lifetime is controlled by the reference count. | |
bool | locked_ |
This is a helper class used in the implementation of ProxyPushConumer. It provides a Guard mechanism to increment the reference count on the proxy, eliminating the need to hold mutexes during long operations.
TAO_CEC_ProxyPushConsumer_Guard::TAO_CEC_ProxyPushConsumer_Guard | ( | ACE_Lock * | lock, | |
CORBA::ULong & | refcount, | |||
TAO_CEC_EventChannel * | ec, | |||
TAO_CEC_ProxyPushConsumer * | proxy | |||
) |
Constructor.
TAO_CEC_ProxyPushConsumer_Guard::~TAO_CEC_ProxyPushConsumer_Guard | ( | void | ) |
Destructor.
ACE_INLINE bool TAO_CEC_ProxyPushConsumer_Guard::locked | ( | void | ) | const |
Returns true if the reference count successfully acquired.
ACE_Lock* TAO_CEC_ProxyPushConsumer_Guard::lock_ [private] |
The lock used to protect the reference count.
The reference count.
The event channel used to destroy the proxy.
The proxy whose lifetime is controlled by the reference count.
bool TAO_CEC_ProxyPushConsumer_Guard::locked_ [private] |
This flag is set to true if the reference count was successfully acquired.