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_type > | gsid_container |
| typedef std::vector< uid_type > | uid_container |
| typedef std::vector< GroupSession > | group_session_container |
| typedef std::vector< Reservation > | reservation_container |
| typedef std::vector< Member > | member_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 ¶m, 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
| typedef std::vector<GroupSession> group_session::group_session_container |
Definition at line 49 of file group_session/protocol.h.
| typedef std::vector<gsid_type> group_session::gsid_container |
Definition at line 47 of file group_session/protocol.h.
| typedef std::vector<Member> group_session::member_container |
Definition at line 51 of file group_session/protocol.h.
| typedef std::vector<Reservation> group_session::reservation_container |
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::_database | ( | db | ) |
Referenced by group_session::GroupSessionService::activate_reservation(), database::Database::auto_commit(), database::DatabaseWrapper::begin_transaction(), group_session::GroupSessionService::cancel_reservation(), group_session::GroupSessionService::check_for_expirations(), database::Database::Database(), group_session::GroupSessionService::end_group_session(), database::DatabaseWrapper::end_transaction(), database::Database::execute(), group_session::GroupSessionService::insert_reservation(), database::Database::prepare(), group_session::GroupSessionService::process_request(), group_session::GroupSessionService::recount_sessions(), and database::DatabaseWrapper::rollback_transaction().
| std::invalid_argument group_session::_gs_name | ( | initializer. | gs_name | ) |
Definition at line 624 of file group_session/service.cc.
References _num_partitions(), _partition_id(), and protocol::service_type().
Referenced by group_session::GroupSessionService::confirm_reservation_activation(), group_session::GroupSessionService::process_request(), and group_session::GroupSessionService::start_group_session().
| std::invalid_argument group_session::_gs_poll_interval | ( | initializer. | gs_poll_interval, |
| 0 | |||
| ) |
Referenced by group_session::GroupSessionService::transition().
| std::invalid_argument group_session::_gs_poll_timeout | ( | ) |
Referenced by group_session::GroupSessionService::transition().
| 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 | ) |
Referenced by _gs_name(), and group_session::GroupSessionService::transition().
| std::invalid_argument group_session::_protocol_id | ( | protocol | ) |
Referenced by group_session::GroupSessionService::transition().
| std::invalid_argument group_session::_random | ( | _gsid_min | , |
| _gsid_max | |||
| ) |
| std::invalid_argument group_session::_reservation_count | ( | _database-> | count_reservations() | ) |
Referenced by group_session::GroupSessionService::activate_reservation(), group_session::GroupSessionService::cancel_reservation(), group_session::GroupSessionService::check_for_expirations(), group_session::GroupSessionService::insert_reservation(), and group_session::GroupSessionService::recount_sessions().
| std::invalid_argument group_session::_session_count | ( | _database-> | count_sessions() | ) |
Referenced by group_session::GroupSessionService::activate_reservation(), group_session::GroupSessionService::check_for_expirations(), group_session::GroupSessionService::end_group_session(), group_session::GroupSessionService::process_request(), and group_session::GroupSessionService::recount_sessions().
| 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:
-
session The GroupSession to bind. node The 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) | |||
| ) |
| 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::expires | ( | (string, type) | ) |
Referenced by group_session::GroupSessionDatabase::find_expired_gsids(), group_session::GroupSessionDatabase::for_each_expired_gsid(), group_session::GroupSessionService::process_request(), group_session::GroupSessionDatabase::remove_expired_reservations(), and group_session::GroupSessionDatabase::remove_expired_sessions().
| 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:
-
protocol The 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:
-
protocol The protocol number. partition_id The 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 | ( | (sec_type, created) | ) |
Referenced by group_session::GroupSessionDatabase::activate_reservation_participants(), group_session::GroupSessionDatabase::count_observers(), group_session::GroupSessionDatabase::find_observers(), group_session::GroupSessionDatabase::find_participants(), group_session::GroupSessionDatabase::for_each_member_uid(), group_session::GroupSessionDatabase::for_each_member_uid_discard(), group_session::GroupSessionDatabase::for_each_observer(), group_session::GroupSessionDatabase::for_each_participant(), group_session::GroupSessionDatabase::for_each_reservation_participant(), group_session::GroupSessionDatabase::get_member_uids(), group_session::GroupSessionDatabase::get_member_uids_discard(), group_session::GroupSessionDatabase::get_reservation_participants(), gsid_to_protocol_partition(), group_session::GroupSessionDatabase::is_member(), and group_session::GroupSessionDatabase::remove_reservation().
| 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:
-
protocol A 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:
-
protocol A Wispers protocol number. partition_id The partiion number (0 to num_partions - 1). num_partitions The 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:
-
protocol A 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:
-
protocol A Wispers protocol number. partition_id The partiion number (0 to num_partions - 1). num_partitions The 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:
-
gsid The 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_type The 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:
-
gsid The gsid to convert. num_partitions The 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().
| group_session::max_observers | ( | (uid_type, creator_uid) | ) |
| 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 | |||
| ) |
Referenced by group_session::GroupSessionService::process_request().
| 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 40 of file group_session/types.h.
Definition at line 55 of file group_session/types.h.
Definition at line 48 of file group_session/types.h.
Referenced by group_session::GroupSessionService::process_request().