Better naming

This commit is contained in:
Pavel Kirienko
2015-05-09 23:17:22 +03:00
parent ab0017f870
commit 68c36924e3
3 changed files with 5 additions and 5 deletions
@@ -34,7 +34,7 @@ public:
/**
* This method will be invoked when a new log entry is committed (only if the local server is the current Leader).
*/
virtual void onEntryCommitted(const Entry& entry) = 0;
virtual void onEntryCommit(const Entry& entry) = 0;
/**
* Assume false by default.
@@ -373,7 +373,7 @@ class RaftCore : private TimerBase
trace(TraceRaftNewEntryCommitted, commit_index_);
// AT THIS POINT ALLOCATION IS COMPLETE
log_commit_handler_.onEntryCommitted(*persistent_state_.getLog().getEntryAtIndex(commit_index_));
log_commit_handler_.onEntryCommit(*persistent_state_.getLog().getEntryAtIndex(commit_index_));
}
}
}
@@ -119,7 +119,7 @@ class Server : private IAllocationRequestHandler
}
}
virtual void onEntryCommitted(const protocol::dynamic_node_id::server::Entry& entry)
virtual void onEntryCommit(const protocol::dynamic_node_id::server::Entry& entry)
{
tryPublishAllocationResult(entry);
}
@@ -22,14 +22,14 @@ class CommitHandler : public uavcan::dynamic_node_id_server::distributed::ILeade
{
const std::string id_;
virtual void onEntryCommitted(const uavcan::protocol::dynamic_node_id::server::Entry& entry)
virtual void onEntryCommit(const uavcan::protocol::dynamic_node_id::server::Entry& entry)
{
std::cout << "ENTRY COMMITTED [" << id_ << "]\n" << entry << std::endl;
}
virtual void onLeaderChange(bool local_node_is_leader)
{
std::cout << "I AM LEADER: " << (local_node_is_leader ? "YES" : "NOT ANYMORE") << std::endl;
std::cout << "I AM LEADER [" << id_ << "]: " << (local_node_is_leader ? "YES" : "NOT ANYMORE") << std::endl;
}
public: