Savarese Software Research Corporation
group_session Namespace Reference

The group_session namespace contains classes for managing group sessions. More...

Classes

class  GroupSessionDatabase
struct  GroupSessionInitializer
class  GroupSessionOptions
struct  GroupSessionProtocol
class  GSToGroup
 GSToGroup is a utility class for deriving the group name for a group session service based on the provided gsid or protocol and/or partition id. More...
class  GroupSessionService
 GroupSessionService is not a standalone service (although it was originally). More...
struct  GroupSession
struct  param_find_sessions

Typedefs

typedef std::vector< gsid_typegsid_container
typedef std::vector< uid_typeuid_container
typedef std::vector< GroupSessiongroup_session_container
typedef std::vector< Reservationreservation_container
typedef std::vector< Membermember_container

Functions

template<typename session_type >
void bind_group_session_properties (const session_type &session, Properties &node)
 Binds the public properties of a GroupSession instance to a Properties node for use with a WebServiceEvent.
gsid_type gsid_min (const wisp_message_protocol protocol)
 Returns the minimum gsid value associated with the specified protocol.
gsid_type gsid_max (const wisp_message_protocol protocol)
 Returns the maximum gsid value associated with the specified protocol.
gsid_type gsid_min (const wisp_message_protocol protocol, const unsigned int partition_id, const unsigned int num_partitions)
 Returns the minimum gsid value associated with a partition of the specified protocol.
gsid_type gsid_max (const wisp_message_protocol protocol, const unsigned int partition_id, const unsigned int num_partitions)
 Returns the maximum gsid value associated with a partition of the specified protocol.
wisp_message_protocol gsid_to_protocol (const gsid_type gsid)
 Returns the protocol number that a specified gsid belongs to.
unsigned int gsid_to_protocol_partition (gsid_type gsid, const unsigned int num_partitions)
 Returns the protocol partition number associated with a given gsid for a protocol with a specified number of partitions.
string gs_protocol_group (const wisp_message_protocol protocol)
 Returns the group name reserved for group session services for a protocol.
string gs_protocol_partition_group (const wisp_message_protocol protocol, const unsigned int partition_id)
 Returns the group name reserved for the single group session service responsible for a partition of a protocol.
string gsid_protocol_group (const gsid_type gsid)
 Returns the protocol group name reserved for the group sessions services for the protocol associated with the specified gsid.
 WISP_IMPORT (WebServiceProtocol, MessageDeliverEvent)
 WISP_IMPORT (WebServiceProtocol, MessageDeliverEvents)
 WISP_IMPORT (WebServiceProtocol, CallDeliverEvent)
 WISP_IMPORT (WebServiceProtocol, CallDeliverEvents)
std::invalid_argument _protocol_id (protocol)
std::invalid_argument _partition_id (initializer.partition_id)
std::invalid_argument _num_partitions (initializer.num_partitions)
std::invalid_argument _ids_per_expiration_message (initializer.ids_per_expiration_message)
std::invalid_argument _database (db)
std::invalid_argument _gsid_min (gsid_min(_protocol_id, _partition_id, _num_partitions))
std::invalid_argument _gsid_max (gsid_max(_protocol_id, _partition_id, _num_partitions))
std::invalid_argument _random (_gsid_min, _gsid_max)
std::invalid_argument _gs_poll_interval (initializer.gs_poll_interval, 0)
std::invalid_argument _gs_poll_timeout ()
std::invalid_argument _session_count (_database->count_sessions())
std::invalid_argument _reservation_count (_database->count_reservations())
std::invalid_argument _gs_name (initializer.gs_name)
 BOOST_PP_SEQ_FOR_EACH_I (__WSPR_DB_ROW_KEY, GroupSession,(0)) BOOST_PP_SEQ_FOR_EACH_I(__WSPR_DB_ROW_ELEMENT
 gsid ((sec_type, created))((sec_type
 expires ((string, type))((string
 group ((string, name))((unsigned int
max_observers BOOST_PP_SEQ_FOR_EACH (__WSPR_DB_ROW_IS_PRIMARY_KEY, GroupSession,(0)) struct Reservation
 BOOST_PP_SEQ_FOR_EACH_I (__WSPR_DB_ROW_KEY, Reservation,(0)) BOOST_PP_SEQ_FOR_EACH_I(__WSPR_DB_ROW_ELEMENT
 max_observers ((uid_type, creator_uid))((sec_type
gs_lifetime BOOST_PP_SEQ_FOR_EACH (__WSPR_DB_ROW_IS_PRIMARY_KEY, Reservation,(0)) struct Member
 BOOST_PP_SEQ_FOR_EACH_I (__WSPR_DB_ROW_KEY, Member,(0)(1)) BOOST_PP_SEQ_FOR_EACH_I(__WSPR_DB_ROW_ELEMENT
 gsid ((uid_type, uid))) BOOST_PP_SEQ_FOR_EACH(__WSPR_DB_ROW_IS_PRIMARY_KEY
template<typename CallType , typename ParamType , typename DestinationType , typename CallerType >
void call_find_sessions (CallerType &caller, const WebServiceCall &call, const ParamType &param, const DestinationType &service, const db_limit_type max_limit=50)
template<typename ResultType , typename DestinationType , typename CallerType >
void process_find_group_sessions_result (CallerType &caller, const ResultType &msg, const string &session_type, const DestinationType &event_queue)

Variables

std::invalid_argument __pad0__
 GroupSession
 gsid_type
 Reservation
 Member

Detailed Description

The group_session namespace contains classes for managing group sessions.


Typedef Documentation

Definition at line 49 of file group_session/protocol.h.

Definition at line 47 of file group_session/protocol.h.

Definition at line 51 of file group_session/protocol.h.

Definition at line 50 of file group_session/protocol.h.

typedef std::vector<uid_type> group_session::uid_container

Definition at line 48 of file group_session/protocol.h.


Function Documentation

std::invalid_argument group_session::_gs_poll_interval ( initializer.  gs_poll_interval,
 
)
std::invalid_argument group_session::_gs_poll_timeout ( )
std::invalid_argument group_session::_gsid_max ( gsid_max(_protocol_id, _partition_id, _num_partitions)  )
std::invalid_argument group_session::_gsid_min ( gsid_min(_protocol_id, _partition_id, _num_partitions)  )
std::invalid_argument group_session::_ids_per_expiration_message ( initializer.  ids_per_expiration_message)
std::invalid_argument group_session::_num_partitions ( initializer.  num_partitions)

Referenced by _gs_name().

std::invalid_argument group_session::_partition_id ( initializer.  partition_id)
std::invalid_argument group_session::_protocol_id ( protocol  )
template<typename session_type >
void group_session::bind_group_session_properties ( const session_type &  session,
Properties &  node 
) [inline]

Binds the public properties of a GroupSession instance to a Properties node for use with a WebServiceEvent.

You should use this function instead of visit(BindProperties(node)) to avoid leaking internal information such as the session group name.

Parameters:
sessionThe GroupSession to bind.
nodeThe Properties node that will store the session properties.

Definition at line 379 of file group_session/protocol.h.

Referenced by process_find_group_sessions_result().

max_observers group_session::BOOST_PP_SEQ_FOR_EACH ( __WSPR_DB_ROW_IS_PRIMARY_KEY  ,
GroupSession  ,
(0)   
)

Definition at line 40 of file group_session/types.h.

gs_lifetime group_session::BOOST_PP_SEQ_FOR_EACH ( __WSPR_DB_ROW_IS_PRIMARY_KEY  ,
Reservation  ,
(0)   
)

Definition at line 48 of file group_session/types.h.

group_session::BOOST_PP_SEQ_FOR_EACH_I ( __WSPR_DB_ROW_KEY  ,
GroupSession  ,
(0)   
)
group_session::BOOST_PP_SEQ_FOR_EACH_I ( __WSPR_DB_ROW_KEY  ,
Reservation  ,
(0)   
)
group_session::BOOST_PP_SEQ_FOR_EACH_I ( __WSPR_DB_ROW_KEY  ,
Member  ,
(0)(1)   
)
template<typename CallType , typename ParamType , typename DestinationType , typename CallerType >
void group_session::call_find_sessions ( CallerType &  caller,
const WebServiceCall &  call,
const ParamType &  param,
const DestinationType &  service,
const db_limit_type  max_limit = 50 
) [inline]

Definition at line 37 of file group_session/ws.h.

group_session::group ( (string, name)  )
string group_session::gs_protocol_group ( const wisp_message_protocol  protocol) [inline]

Returns the group name reserved for group session services for a protocol.

The format for the group is wspr.gs.protocol.N where N is the protocol number.

Parameters:
protocolThe protocol number.
Returns:
The group name reserved for group session services for the specified protocol.

Definition at line 555 of file group_session/protocol.h.

References group_session::GSToGroup::gs_protocol_group().

Referenced by group_session::GSToGroup::gsid_protocol_group(), and group_session::GroupSessionService::transition().

string group_session::gs_protocol_partition_group ( const wisp_message_protocol  protocol,
const unsigned int  partition_id 
) [inline]

Returns the group name reserved for the single group session service responsible for a partition of a protocol.

The format for the group is wspr.gs.protocol.N.M where N is the protocol number and M is the partition number..

Parameters:
protocolThe protocol number.
partition_idThe parition number.
Returns:
The group name reserved for the single group session service responsible for the specified partition of a protocol.

Definition at line 572 of file group_session/protocol.h.

References group_session::GSToGroup::gs_protocol_partition_group().

Referenced by group_session::GroupSessionService::transition().

group_session::gsid ( (uid_type, uid)  )
gsid_type group_session::gsid_max ( const wisp_message_protocol  protocol) [inline]

Returns the maximum gsid value associated with the specified protocol.

Parameters:
protocolA Wispers protocol number.
Returns:
The maximum gsid value associated with the specified protocol.

Definition at line 407 of file group_session/protocol.h.

Referenced by gsid_max().

gsid_type group_session::gsid_max ( const wisp_message_protocol  protocol,
const unsigned int  partition_id,
const unsigned int  num_partitions 
) [inline]

Returns the maximum gsid value associated with a partition of the specified protocol.

Parameters:
protocolA Wispers protocol number.
partition_idThe partiion number (0 to num_partions - 1).
num_partitionsThe number of partitions the protocol has been divided into.
Returns:
The maximum gsid value associated with a partition of the specified protocol.

Definition at line 445 of file group_session/protocol.h.

References gsid_max(), and gsid_min().

gsid_type group_session::gsid_min ( const wisp_message_protocol  protocol) [inline]

Returns the minimum gsid value associated with the specified protocol.

Parameters:
protocolA Wispers protocol number.
Returns:
The minimum gsid value associated with the specified protocol.

Definition at line 395 of file group_session/protocol.h.

Referenced by gsid_max(), gsid_min(), and gsid_to_protocol_partition().

gsid_type group_session::gsid_min ( const wisp_message_protocol  protocol,
const unsigned int  partition_id,
const unsigned int  num_partitions 
) [inline]

Returns the minimum gsid value associated with a partition of the specified protocol.

Parameters:
protocolA Wispers protocol number.
partition_idThe partiion number (0 to num_partions - 1).
num_partitionsThe number of partitions the protocol has been divided into.
Returns:
The minimum gsid value associated with a partition of the specified protocol.

Definition at line 424 of file group_session/protocol.h.

References gsid_min().

string group_session::gsid_protocol_group ( const gsid_type  gsid) [inline]

Returns the protocol group name reserved for the group sessions services for the protocol associated with the specified gsid.

Parameters:
gsidThe group session id.
Returns:
The protocol group name reserved for the group sessions services for the protocol associated with the specified gsid.

Definition at line 587 of file group_session/protocol.h.

References group_session::GSToGroup::gsid_protocol_group().

wisp_message_protocol group_session::gsid_to_protocol ( const gsid_type  gsid) [inline]

Returns the protocol number that a specified gsid belongs to.

Parameters:
gsid_typeThe gsid to convert.
Returns:
The protocol number that a specified gsid belongs to.

Definition at line 462 of file group_session/protocol.h.

Referenced by group_session::GSToGroup::gsid_protocol_group(), and gsid_to_protocol_partition().

unsigned int group_session::gsid_to_protocol_partition ( gsid_type  gsid,
const unsigned int  num_partitions 
) [inline]

Returns the protocol partition number associated with a given gsid for a protocol with a specified number of partitions.

Parameters:
gsidThe gsid to convert.
num_partitionsThe number of partitions.
Returns:
The protocol partition number associated with a given gsid.

Definition at line 489 of file group_session/protocol.h.

References gsid(), gsid_min(), and gsid_to_protocol().

template<typename ResultType , typename DestinationType , typename CallerType >
void group_session::process_find_group_sessions_result ( CallerType &  caller,
const ResultType &  msg,
const string &  session_type,
const DestinationType &  event_queue 
) [inline]

Definition at line 58 of file group_session/ws.h.

References bind_group_session_properties(), and ws::web_event_indirect().

group_session::WISP_IMPORT ( WebServiceProtocol  ,
MessageDeliverEvent   
)
group_session::WISP_IMPORT ( WebServiceProtocol  ,
MessageDeliverEvents   
)
group_session::WISP_IMPORT ( WebServiceProtocol  ,
CallDeliverEvent   
)
group_session::WISP_IMPORT ( WebServiceProtocol  ,
CallDeliverEvents   
)

Variable Documentation

std::invalid_argument group_session::__pad0__

Definition at line 611 of file group_session/service.cc.

Definition at line 40 of file group_session/types.h.

Definition at line 55 of file group_session/types.h.


Savarese Software Research Corporation
Copyright © 2006-2011 Savarese Software Research Corporation. All rights reserved.