Define a wrapper class for callback_data.data (#1301)

This commit is contained in:
Stephanie Wang
2017-12-08 11:48:21 -08:00
committed by GitHub
parent 5adbdfecd0
commit bac39a134e
10 changed files with 146 additions and 65 deletions
+5 -3
View File
@@ -6,7 +6,8 @@ void db_client_table_remove(DBHandle *db_handle,
RetryInfo *retry,
db_client_table_done_callback done_callback,
void *user_context) {
init_table_callback(db_handle, db_client_id, __func__, NULL, retry,
init_table_callback(db_handle, db_client_id, __func__,
new CommonCallbackData(NULL), retry,
(table_done_callback) done_callback,
redis_db_client_table_remove, user_context);
}
@@ -23,7 +24,8 @@ void db_client_table_subscribe(
sub_data->subscribe_callback = subscribe_callback;
sub_data->subscribe_context = subscribe_context;
init_table_callback(db_handle, NIL_ID, __func__, sub_data, retry,
init_table_callback(db_handle, NIL_ID, __func__,
new CommonCallbackData(sub_data), retry,
(table_done_callback) done_callback,
redis_db_client_table_subscribe, user_context);
}
@@ -80,7 +82,7 @@ void plasma_manager_send_heartbeat(DBHandle *db_handle) {
RayConfig::instance().heartbeat_timeout_milliseconds();
heartbeat_retry.fail_callback = NULL;
init_table_callback(db_handle, NIL_ID, __func__, NULL,
init_table_callback(db_handle, NIL_ID, __func__, new CommonCallbackData(NULL),
(RetryInfo *) &heartbeat_retry, NULL,
redis_plasma_manager_send_heartbeat, NULL);
}