void getsucc (const chord_node &n) { chord_nodelistextres *res = New chord_nodelistextres (); doRPC (n, chord_program_1, succproc, &n.x, res, wrap (&getsucc_cb, getusec (), n, res)); }
//----- update predecessor ------------------------------------------------- void update_pred (f_node *nu) { chordID n = nu->ID; chord_nodelistextres *res = New chord_nodelistextres (); doRPC (nu, chord_program_1, CHORDPROC_GETPRED_EXT, &n, res, wrap (&update_pred_got_pred, nu->ID, nu->host, nu->port, res)); }
void update_succlist (f_node *nu) { chordID n = nu->ID; chord_nodelistextres *res = New chord_nodelistextres (); doRPC (nu, chord_program_1, CHORDPROC_GETSUCC_EXT, &n, res, wrap (&update_succ_got_succ, nu->ID, nu->host, nu->port, res)); }
void getsucc (const chord_node &n) { chord_nodelistextres *res = New chord_nodelistextres (); u_int64_t start = getusec (); doRPC (n, CHORDPROC_GETSUCC_EXT, &n.x, res, wrap (&getsucc_cb, n.x, n.r.hostname, res, start)); }
void print_predecessors (const chord_node &dst) { ptr<chordID> ga = New refcounted<chordID> (dst.x); chord_nodelistextres *lst = New chord_nodelistextres (); doRPC (dst, chord_program_1, CHORDPROC_GETPRED_EXT, ga, lst, wrap (processreslist_cb, "predecessors", &predecessors, lst)); outstanding++; }
//----- update fingers ----------------------------------------------------- void update_fingers (f_node *nu) { chordID n = nu->ID; chord_nodelistextres *res = New chord_nodelistextres (); if (accordion) doRPC (nu, accordion_program_1, ACCORDIONPROC_GETFINGERS_EXT, &n, res, wrap (&update_fingers_got_fingers, nu->ID, nu->host, nu->port, res)); else doRPC (nu, fingers_program_1, FINGERSPROC_GETFINGERS_EXT, &n, res, wrap (&update_fingers_got_fingers, nu->ID, nu->host, nu->port, res)); }
void print_fingers (const chord_node &dst) { ptr<chordID> ga = New refcounted<chordID> (dst.x); chord_nodelistextres *lst = New chord_nodelistextres (); if (do_accordion) doRPC (dst, accordion_program_1, ACCORDIONPROC_GETFINGERS_EXT, ga, lst, wrap (processreslist_cb, "fingers", &fingers, lst)); else doRPC (dst, fingers_program_1, FINGERSPROC_GETFINGERS_EXT, ga, lst, wrap (processreslist_cb, "fingers", &fingers, lst)); outstanding++; }