mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-08-06 15:02:41 +03:00
Cleaning wsrep-API dependencies from library code
Replace all wsrep_api.h dependencies with similar code in library implementation. Also add gcc/g++ 4.4 to travis automation to get better compiler coverage.
This commit is contained in:
@@ -307,6 +307,10 @@ namespace wsrep
|
||||
|
||||
/**
|
||||
* Append a key into transaction write set.
|
||||
*
|
||||
* @param key Key to be appended
|
||||
*
|
||||
* @return Zero on success, non-zero on failure.
|
||||
*/
|
||||
int append_key(const wsrep::key& key)
|
||||
{
|
||||
@@ -315,6 +319,27 @@ namespace wsrep
|
||||
return transaction_.append_key(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Append keys in key_array into transaction write set.
|
||||
*
|
||||
* @param keys Array of keys to be appended
|
||||
*
|
||||
* @return Zero in case of success, non-zero on failure.
|
||||
*/
|
||||
int append_keys(const wsrep::key_array& keys)
|
||||
{
|
||||
assert(mode_ == m_local || mode_ == m_toi);
|
||||
assert(state_ == s_exec);
|
||||
for (auto i(keys.begin()); i != keys.end(); ++i)
|
||||
{
|
||||
if (transaction_.append_key(*i))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append data into transaction write set.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user