#include <jupiter_algorithm.hpp>
Public Types | |
| typedef Document | document_type |
| typedef operation< document_type > | operation_type |
| typedef record< document_type > | record_type |
Public Member Functions | |
| jupiter_algorithm () | |
| ~jupiter_algorithm () | |
| std::auto_ptr< record_type > | local_op (const operation_type &op) |
| std::auto_ptr< operation_type > | remote_op (const record_type &rec) |
Protected Types | |
| typedef std::list< operation_storage * > | ack_list_type |
Protected Member Functions | |
| void | discard_operations (const record_type &rec) |
| std::auto_ptr< operation_type > | transform (const operation_type &op) const |
| void | check_preconditions (const record_type &rec) const |
Protected Attributes | |
| vector_time | m_time |
| ack_list_type | m_ack_list |
Classes | |
| class | operation_storage |
Definition at line 33 of file jupiter_algorithm.hpp.
| typedef Document obby::jupiter_algorithm< Document >::document_type |
Definition at line 36 of file jupiter_algorithm.hpp.
| typedef operation<document_type> obby::jupiter_algorithm< Document >::operation_type |
Definition at line 37 of file jupiter_algorithm.hpp.
| typedef record<document_type> obby::jupiter_algorithm< Document >::record_type |
Definition at line 38 of file jupiter_algorithm.hpp.
typedef std::list<operation_storage*> obby::jupiter_algorithm< Document >::ack_list_type [protected] |
Definition at line 102 of file jupiter_algorithm.hpp.
| obby::jupiter_algorithm< Document >::jupiter_algorithm | ( | ) |
Definition at line 152 of file jupiter_algorithm.hpp.
| obby::jupiter_algorithm< Document >::~jupiter_algorithm | ( | ) |
Definition at line 158 of file jupiter_algorithm.hpp.
References obby::jupiter_algorithm< Document >::m_ack_list.
| std::auto_ptr< typename jupiter_algorithm< Document >::record_type > obby::jupiter_algorithm< Document >::local_op | ( | const operation_type & | op | ) |
Returns a record the given local operation.
Definition at line 170 of file jupiter_algorithm.hpp.
References obby::jupiter_algorithm< Document >::m_ack_list, and obby::jupiter_algorithm< Document >::m_time.
Referenced by obby::jupiter_client< Document >::local_op(), and obby::jupiter_client< Document >::undo_op().
| std::auto_ptr< typename jupiter_algorithm< Document >::operation_type > obby::jupiter_algorithm< Document >::remote_op | ( | const record_type & | rec | ) |
Returns a transformed operation after a remote host sent the given record.
Definition at line 180 of file jupiter_algorithm.hpp.
References obby::jupiter_algorithm< Document >::check_preconditions(), obby::jupiter_algorithm< Document >::discard_operations(), obby::record< Document >::get_operation(), obby::basic_vector_time< time_type >::inc_remote(), obby::jupiter_algorithm< Document >::m_time, and obby::jupiter_algorithm< Document >::transform().
Referenced by obby::jupiter_client< Document >::remote_op().
| void obby::jupiter_algorithm< Document >::discard_operations | ( | const record_type & | rec | ) | [protected] |
Discard from the remote site acknowledged operations.
Definition at line 190 of file jupiter_algorithm.hpp.
References obby::basic_vector_time< time_type >::get_local(), obby::basic_vector_time< time_type >::get_remote(), obby::record< Document >::get_time(), obby::jupiter_algorithm< Document >::m_ack_list, and obby::jupiter_algorithm< Document >::m_time.
Referenced by obby::jupiter_algorithm< Document >::remote_op().
| std::auto_ptr< typename jupiter_algorithm< Document >::operation_type > obby::jupiter_algorithm< Document >::transform | ( | const operation_type & | op | ) | const [protected] |
Transform the given operation by the local ones that have not been acknowledged by the remote site.
Definition at line 216 of file jupiter_algorithm.hpp.
References obby::operation< Document >::clone(), and obby::jupiter_algorithm< Document >::m_ack_list.
Referenced by obby::jupiter_algorithm< Document >::remote_op().
| void obby::jupiter_algorithm< Document >::check_preconditions | ( | const record_type & | rec | ) | const [protected] |
Checks preconditions that have to be fulfilled before transforming.
Definition at line 243 of file jupiter_algorithm.hpp.
References obby::basic_vector_time< time_type >::get_local(), obby::basic_vector_time< time_type >::get_remote(), obby::record< Document >::get_time(), obby::jupiter_algorithm< Document >::m_ack_list, and obby::jupiter_algorithm< Document >::m_time.
Referenced by obby::jupiter_algorithm< Document >::remote_op().
vector_time obby::jupiter_algorithm< Document >::m_time [protected] |
ack_list_type obby::jupiter_algorithm< Document >::m_ack_list [protected] |
Definition at line 105 of file jupiter_algorithm.hpp.
Referenced by obby::jupiter_algorithm< Document >::check_preconditions(), obby::jupiter_algorithm< Document >::discard_operations(), obby::jupiter_algorithm< Document >::local_op(), obby::jupiter_algorithm< Document >::transform(), and obby::jupiter_algorithm< Document >::~jupiter_algorithm().
1.5.1