#include <ACE/Remote_Tokens.h>
class ACE_Remote_Token_Proxy : public ACE_Token_Proxy {
public:ACE_Remote_Token_Proxy (void);virtual ~ACE_Remote_Token_Proxy (void);int open ( const ASYS_TCHAR *name, int ignore_deadlock = 0, int debug = 0 );int initiate_connection (void);virtual int acquire (int notify = 0, void (*sleep_hook)( void *) = 0, ACE_Synch_Options &options = ACE_Synch_Options::synch );virtual int tryacquire (void (*sleep_hook)(void *) = 0);virtual int renew ( int requeue_position = 0, ACE_Synch_Options &options = ACE_Synch_Options::synch );ACE_Synch_Options::synch);ACE_Synch_Options::synch);virtual void token_acquired (ACE_TPQ_Entry *);virtual const ASYS_TCHAR* owner_id (void);static void set_server_address ( const ACE_INET_Addr &server_address );void dump (void) const;protected:int ignore_shadow_deadlock_;int request_reply ( ACE_Token_Request &request, ACE_Synch_Options &options );};
ACE_Remote_Token_Proxy (void);
virtual ~ACE_Remote_Token_Proxy (void);
int open (
const ASYS_TCHAR *name,
int ignore_deadlock = 0,
int debug = 0
);
name is the string uniquely identifying
the token. ignore_deadlock can be 1 to disable deadlock
notifications. debug prints debug messages.
int initiate_connection (void);
virtual int acquire (int notify = 0, void (*sleep_hook)(
void *) = 0,
ACE_Synch_Options &options = ACE_Synch_Options::synch
);
errno == problem.
virtual int tryacquire (void (*sleep_hook)(void *) = 0);
virtual int renew (
int requeue_position = 0,
ACE_Synch_Options &options = ACE_Synch_Options::synch
);
release followed by acquire, but
it is faster. options contains the timeout value used if renew
blocks. As with acquire, the timer is maintained at the token
server. If there are waiters and requeue_position == -1, the
caller is queued at the rear of the waiter list. Otherwise,
requeue_position specifies the number of waiters to "let by"
before reacquiring the token (effectively, the position in the
waiter list.)
ACE_Synch_Options::synch);
errno ==
problem.
ACE_Synch_Options::synch);
. This has no
functionality.
virtual void token_acquired (ACE_TPQ_Entry *);
virtual const ASYS_TCHAR* owner_id (void);
static void set_server_address (const ACE_INET_Addr &server_address);
void dump (void) const;
int ignore_shadow_deadlock_;
int request_reply (
ACE_Token_Request &request,
ACE_Synch_Options &options
);
owner_id
is not implemented.