Part of CCNx Sync. More...
Go to the source code of this file.
Defines | |
#define | M 1000000 |
#define | SYNC_UPDATE_VERSION (20120307) |
#define | StatsLine(XXX) |
Enumerations | |
enum | SyncCompareState { SyncCompare_init, SyncCompare_preload, SyncCompare_busy, SyncCompare_waiting, SyncCompare_done, SyncCompare_init, SyncCompare_preload, SyncCompare_busy, SyncCompare_waiting, SyncCompare_done } |
enum | SyncUpdateState { SyncUpdate_init, SyncUpdate_inserted, SyncUpdate_busy, SyncUpdate_error, SyncUpdate_done } |
Functions | |
static int | HeartbeatAction (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
static int | UpdateAction (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
static int | CompareAction (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
static int | showCacheEntry (struct SyncRootStruct *root, char *dst, int lim, char *prefix, struct SyncHashCacheEntry *ce) |
static void | showCacheEntry1 (struct SyncRootStruct *root, char *here, char *msg, struct SyncHashCacheEntry *ce) |
static void | showCacheEntry2 (struct SyncRootStruct *root, char *here, char *msg, struct SyncHashCacheEntry *ce1, struct SyncHashCacheEntry *ce2) |
static struct SyncActionData * | newActionData (enum SyncRegisterActionKind kind) |
static void | linkActionData (struct SyncRootStruct *root, struct SyncActionData *data) |
static void | delinkActionData (struct SyncActionData *data) |
static int | moveActionData (struct SyncActionData *data, enum SyncActionState dstState) |
static struct SyncActionData * | destroyActionData (struct SyncActionData *data) |
static char * | getCmdStr (enum SyncRegisterActionKind kind) |
static char * | getKindStr (enum SyncRegisterActionKind kind) |
static void | setCovered (struct SyncHashCacheEntry *ce) |
static int | isCovered (struct SyncHashCacheEntry *ce) |
static int | compareHash (struct ccn_charbuf *hashX, struct ccn_charbuf *hashY) |
static struct SyncNameAccum * | sortNames (struct SyncRootStruct *root, struct SyncNameAccum *src) |
static int | reportExclude (struct SyncRootStruct *root, struct ccn_buf_decoder *d) |
static struct ccn_charbuf * | formatStats (struct SyncRootStruct *root, struct ccn_charbuf *cb) |
static struct SyncNameAccum * | exclusionsFromHashList (struct SyncRootStruct *root, struct SyncNameAccum *acc, struct SyncHashInfoList *list) |
static struct ccn_charbuf * | constructCommandPrefix (struct SyncRootStruct *root, enum SyncRegisterActionKind kind) |
static int | extractDeltas (struct SyncRootStruct *root, struct ccn_upcall_info *info) |
static struct SyncNodeComposite * | extractNode (struct SyncRootStruct *root, struct ccn_upcall_info *info) |
static int | noteHash (struct SyncRootStruct *root, struct SyncHashCacheEntry *ce, int add, int remote) |
static struct SyncHashInfoList * | chooseRemoteHash (struct SyncRootStruct *root) |
static int | fauxError (struct SyncBaseStruct *base) |
static void | destroyCompareData (struct SyncCompareData *data) |
static void | abortCompare (struct SyncCompareData *data, char *why) |
static int | extractBuf (struct ccn_charbuf *cb, struct SyncNodeComposite *nc, struct SyncNodeElem *ne) |
static struct SyncHashCacheEntry * | ensureRemoteEntry (struct SyncCompareData *data, const unsigned char *xp, ssize_t xs) |
static struct SyncHashCacheEntry * | cacheEntryForElem (struct SyncCompareData *data, struct SyncNodeComposite *nc, struct SyncNodeElem *ne, int remote) |
static int | comparisonFailed (struct SyncCompareData *data, char *why, int line) |
static int | addNameFromCompare (struct SyncCompareData *data) |
static int | doPreload (struct SyncCompareData *data) |
static int | doComparison (struct SyncCompareData *data) |
static int | fetchStablePoint (struct SyncBaseStruct *base, ccnr_hwm *ptr) |
static int | storeStablePoint (struct SyncBaseStruct *base, ccnr_hwm point) |
static int | isRootStableEnough (struct SyncRootStruct *root, ccnr_hwm target) |
static void | purgeOldEntries (struct SyncRootStruct *root) |
static void | kickCompare (struct SyncCompareData *scd, struct SyncActionData *action) |
static void | kickHeartBeat (struct SyncRootStruct *root, int micros) |
static struct SyncHashCacheEntry * | newNodeCommon (struct SyncRootStruct *root, struct SyncNodeAccum *nodes, struct SyncNodeComposite *nc) |
static struct SyncHashCacheEntry * | nodeFromNodes (struct SyncRootStruct *root, struct SyncNodeAccum *na) |
int | SyncStartSliceEnum (struct SyncRootStruct *root) |
starts a slice enumeration for the root | |
int | SyncStartHeartbeat (struct SyncBaseStruct *base) |
starts a periodic wakeup that maintains state across all roots | |
enum ccn_upcall_res | SyncRemoteFetchResponse (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info) |
int | SyncStartNodeFetch (struct SyncRootStruct *root, struct SyncHashCacheEntry *ce, struct SyncCompareData *comp) |
starts a remote fetch of the given node, based on the hash comp may be NULL if this is not for a compare | |
int | SyncStartContentFetch (struct SyncRootStruct *root, struct ccn_charbuf *name, struct SyncCompareData *comp) |
starts a remote fetch of the given name comp may be NULL if this is not for a compare | |
static struct SyncActionData * | SyncFindAction (struct SyncRootStruct *root, enum SyncRegisterActionKind kind) |
int | SyncAddName (struct SyncBaseStruct *base, struct ccn_charbuf *name, ccnr_accession item) |
Adds the given name to any applicable roots. | |
static int | findAndDeleteRoot (struct SyncBaseStruct *base, char *here, const unsigned char *hp, ssize_t hs) |
int | SyncHandleSlice (struct SyncBaseStruct *base, struct ccn_charbuf *name) |
Creates a new slice from a full name. | |
static struct SyncRootDeltas * | NewDeltas (struct SyncRootStruct *root) |
static struct SyncRootDeltas * | FreeDeltas (struct SyncRootDeltas *deltas) |
static int | RemRootDeltas (struct SyncRootStruct *root, struct SyncRootDeltas *deltas) |
static int | SendDeltasReply (struct SyncRootStruct *root, struct SyncRootDeltas *deltas) |
static struct SyncHashInfoList * | scanRemoteSeen (struct SyncRootStruct *root, struct SyncHashCacheEntry *ceR) |
static struct SyncRootDeltas * | CloseUpdateCoding (struct SyncUpdateData *ud) |
static struct SyncRootDeltas * | scanDeltas (struct SyncRootStruct *root, struct SyncHashCacheEntry *ceR) |
enum ccn_upcall_res | SyncInterestArrived (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info) |
static int | SyncRegisterInterest (struct SyncRootStruct *root, enum SyncRegisterActionKind kind) |
int | SyncRegisterInterests (struct SyncRootStruct *root) |
registers interests associated with the given root these include C1.S.RA (Root Advise) and C1.S.NF (Node Fetch) interests additional interests may be registered as the protocol evolves | |
enum ccn_upcall_res | SyncRootAdviseResponse (struct ccn_closure *selfp, enum ccn_upcall_kind kind, struct ccn_upcall_info *info) |
int | SyncSendRootAdviseInterest (struct SyncRootStruct *root) |
send a root advise request for the given root only one at a time may be outstanding | |
static int | MakeNodeFromNames (struct SyncUpdateData *ud, int split) |
static int | TryNodeSplit (struct SyncUpdateData *ud) |
static int | AddUpdateName (struct SyncUpdateData *ud, struct ccn_charbuf *name, int isNew) |
static int | SyncTreeMergeNames (struct SyncTreeWorkerHead *head, struct SyncUpdateData *ud) |
static struct SyncUpdateData * | FreeUpdateData (struct SyncUpdateData *ud) |
int | SyncUpdateRoot (struct SyncRootStruct *root) |
updates the root with the current root->namesToAdd | |
int | SyncStartCompareAction (struct SyncRootStruct *root, struct ccn_charbuf *hashR) |
initiates a compare action with the given remote hash | |
Variables | |
static int | useCompExcl = 1 |
static int | showHighLevel = 1 |
static int | nDeltasLimit = 4 |
static int | cachePurgeTrigger = 60 |
static int | cacheCleanBatch = 16 |
static int | cacheCleanDelta = 8 |
static int | adviseNeedReset = 1 |
static int | updateStallDelta = 15 |
static int | updateNeedDelta = 6 |
static int | shortDelayMicros = 1000 |
static int | compareAssumeBad = 20 |
static int | nodeSplitTrigger = 4000 |
static int | exclusionLimit = 600 |
static int | exclusionTrig = 5 |
static int | stableTimeTrig = 10 |
static int | hashSplitTrigger = 17 |
static int | namesYieldInc = 100 |
static int | namesYieldMicros = 20*1000 |
static char * | syncStableSuffix = "SyncStable" |
Part of CCNx Sync.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Definition in file SyncActions.c.
#define M 1000000 |
Definition at line 42 of file SyncActions.c.
Referenced by chooseRemoteHash(), exclusionsFromHashList(), formatStats(), GetCurrentTime(), GetCurrentTimeUSecs(), HeartbeatAction(), MilliSleep(), purgeOldEntries(), and SyncCurrentTime().
#define StatsLine | ( | XXX | ) |
if (stats->XXX) \ pos += snprintf(s+pos, lim-pos, ", %s %ju", #XXX, (uintmax_t) stats->XXX);
Definition at line 436 of file SyncActions.c.
Referenced by formatStats().
#define SYNC_UPDATE_VERSION (20120307) |
Definition at line 65 of file SyncActions.c.
Referenced by extractDeltas(), and NewDeltas().
enum SyncCompareState |
SyncCompare_init | |
SyncCompare_preload | |
SyncCompare_busy | |
SyncCompare_waiting | |
SyncCompare_done | |
SyncCompare_init | |
SyncCompare_preload | |
SyncCompare_busy | |
SyncCompare_waiting | |
SyncCompare_done |
Definition at line 67 of file SyncActions.c.
enum SyncUpdateState |
Definition at line 102 of file SyncActions.c.
static void abortCompare | ( | struct SyncCompareData * | data, | |
char * | why | |||
) | [static] |
Definition at line 836 of file SyncActions.c.
Referenced by CompareAction(), and HeartbeatAction().
static int addNameFromCompare | ( | struct SyncCompareData * | data | ) | [static] |
Definition at line 953 of file SyncActions.c.
Referenced by doComparison().
static int AddUpdateName | ( | struct SyncUpdateData * | ud, | |
struct ccn_charbuf * | name, | |||
int | isNew | |||
) | [static] |
Definition at line 3446 of file SyncActions.c.
Referenced by SyncTreeMergeNames().
static struct SyncHashCacheEntry* cacheEntryForElem | ( | struct SyncCompareData * | data, | |
struct SyncNodeComposite * | nc, | |||
struct SyncNodeElem * | ne, | |||
int | remote | |||
) | [static, read] |
Definition at line 906 of file SyncActions.c.
Referenced by doComparison(), and doPreload().
static struct SyncHashInfoList* chooseRemoteHash | ( | struct SyncRootStruct * | root | ) | [static, read] |
Definition at line 759 of file SyncActions.c.
Referenced by HeartbeatAction().
static struct SyncRootDeltas* CloseUpdateCoding | ( | struct SyncUpdateData * | ud | ) | [static, read] |
Definition at line 2645 of file SyncActions.c.
Referenced by UpdateAction().
static int CompareAction | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
Definition at line 1386 of file SyncActions.c.
Referenced by kickCompare().
static int compareHash | ( | struct ccn_charbuf * | hashX, | |
struct ccn_charbuf * | hashY | |||
) | [static] |
Definition at line 357 of file SyncActions.c.
Referenced by abortCompare(), and SyncStartNodeFetch().
static int comparisonFailed | ( | struct SyncCompareData * | data, | |
char * | why, | |||
int | line | |||
) | [static] |
Definition at line 946 of file SyncActions.c.
Referenced by doComparison().
static struct ccn_charbuf* constructCommandPrefix | ( | struct SyncRootStruct * | root, | |
enum SyncRegisterActionKind | kind | |||
) | [static, read] |
Definition at line 588 of file SyncActions.c.
Referenced by SendDeltasReply(), SyncRegisterInterest(), SyncSendRootAdviseInterest(), and SyncStartNodeFetch().
static void delinkActionData | ( | struct SyncActionData * | data | ) | [static] |
Definition at line 205 of file SyncActions.c.
Referenced by destroyActionData(), and moveActionData().
static struct SyncActionData* destroyActionData | ( | struct SyncActionData * | data | ) | [static, read] |
Definition at line 276 of file SyncActions.c.
Referenced by CompareAction(), destroyCompareData(), doPreload(), SyncInterestArrived(), SyncRegisterInterest(), SyncRemoteFetchResponse(), SyncRootAdviseResponse(), SyncSendRootAdviseInterest(), SyncStartContentFetch(), and SyncStartNodeFetch().
static void destroyCompareData | ( | struct SyncCompareData * | data | ) | [static] |
Definition at line 803 of file SyncActions.c.
Referenced by abortCompare(), and CompareAction().
static int doComparison | ( | struct SyncCompareData * | data | ) | [static] |
Definition at line 1049 of file SyncActions.c.
Referenced by CompareAction().
static int doPreload | ( | struct SyncCompareData * | data | ) | [static] |
Definition at line 978 of file SyncActions.c.
Referenced by CompareAction().
static struct SyncHashCacheEntry* ensureRemoteEntry | ( | struct SyncCompareData * | data, | |
const unsigned char * | xp, | |||
ssize_t | xs | |||
) | [static, read] |
Definition at line 890 of file SyncActions.c.
Referenced by cacheEntryForElem().
static struct SyncNameAccum* exclusionsFromHashList | ( | struct SyncRootStruct * | root, | |
struct SyncNameAccum * | acc, | |||
struct SyncHashInfoList * | list | |||
) | [static, read] |
Definition at line 552 of file SyncActions.c.
Referenced by SyncSendRootAdviseInterest().
static int extractBuf | ( | struct ccn_charbuf * | cb, | |
struct SyncNodeComposite * | nc, | |||
struct SyncNodeElem * | ne | |||
) | [static] |
Definition at line 881 of file SyncActions.c.
Referenced by doComparison(), and SyncTreeMergeNames().
static int extractDeltas | ( | struct SyncRootStruct * | root, | |
struct ccn_upcall_info * | info | |||
) | [static] |
Definition at line 611 of file SyncActions.c.
Referenced by SyncRootAdviseResponse().
static struct SyncNodeComposite* extractNode | ( | struct SyncRootStruct * | root, | |
struct ccn_upcall_info * | info | |||
) | [static, read] |
Definition at line 658 of file SyncActions.c.
Referenced by SyncRemoteFetchResponse(), and SyncRootAdviseResponse().
static int fauxError | ( | struct SyncBaseStruct * | base | ) | [static] |
Definition at line 786 of file SyncActions.c.
Referenced by SyncRemoteFetchResponse(), and SyncRootAdviseResponse().
static int fetchStablePoint | ( | struct SyncBaseStruct * | base, | |
ccnr_hwm * | ptr | |||
) | [static] |
Definition at line 1258 of file SyncActions.c.
Referenced by SyncStartHeartbeat().
static int findAndDeleteRoot | ( | struct SyncBaseStruct * | base, | |
char * | here, | |||
const unsigned char * | hp, | |||
ssize_t | hs | |||
) | [static] |
Definition at line 2342 of file SyncActions.c.
Referenced by SyncHandleSlice().
static struct ccn_charbuf* formatStats | ( | struct SyncRootStruct * | root, | |
struct ccn_charbuf * | cb | |||
) | [static, read] |
Definition at line 441 of file SyncActions.c.
Referenced by CompareAction(), SyncInterestArrived(), and UpdateAction().
static struct SyncRootDeltas* FreeDeltas | ( | struct SyncRootDeltas * | deltas | ) | [static, read] |
Definition at line 2523 of file SyncActions.c.
Referenced by CloseUpdateCoding(), FreeUpdateData(), RemRootDeltas(), and UpdateAction().
static struct SyncUpdateData* FreeUpdateData | ( | struct SyncUpdateData * | ud | ) | [static, read] |
Definition at line 3617 of file SyncActions.c.
Referenced by SyncUpdateRoot(), and UpdateAction().
static char* getCmdStr | ( | enum SyncRegisterActionKind | kind | ) | [static] |
Definition at line 293 of file SyncActions.c.
Referenced by constructCommandPrefix().
static char* getKindStr | ( | enum SyncRegisterActionKind | kind | ) | [static] |
Definition at line 309 of file SyncActions.c.
Referenced by SyncInterestArrived(), and SyncRegisterInterest().
static int HeartbeatAction | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
Definition at line 1724 of file SyncActions.c.
Referenced by kickHeartBeat(), and SyncStartHeartbeat().
static int isCovered | ( | struct SyncHashCacheEntry * | ce | ) | [static] |
Definition at line 346 of file SyncActions.c.
Referenced by doComparison(), doPreload(), exclusionsFromHashList(), noteHash(), SyncInterestArrived(), SyncRemoteFetchResponse(), and SyncRootAdviseResponse().
static int isRootStableEnough | ( | struct SyncRootStruct * | root, | |
ccnr_hwm | target | |||
) | [static] |
Definition at line 1338 of file SyncActions.c.
Referenced by HeartbeatAction().
static void kickCompare | ( | struct SyncCompareData * | scd, | |
struct SyncActionData * | action | |||
) | [static] |
Definition at line 1536 of file SyncActions.c.
Referenced by SyncRemoteFetchResponse(), and SyncStartCompareAction().
static void kickHeartBeat | ( | struct SyncRootStruct * | root, | |
int | micros | |||
) | [static] |
Definition at line 1550 of file SyncActions.c.
Referenced by UpdateAction().
static void linkActionData | ( | struct SyncRootStruct * | root, | |
struct SyncActionData * | data | |||
) | [static] |
Definition at line 195 of file SyncActions.c.
Referenced by SyncRegisterInterest(), SyncSendRootAdviseInterest(), SyncStartContentFetch(), and SyncStartNodeFetch().
static int MakeNodeFromNames | ( | struct SyncUpdateData * | ud, | |
int | split | |||
) | [static] |
Definition at line 3292 of file SyncActions.c.
Referenced by TryNodeSplit(), and UpdateAction().
static int moveActionData | ( | struct SyncActionData * | data, | |
enum SyncActionState | dstState | |||
) | [static] |
Definition at line 250 of file SyncActions.c.
Referenced by SyncRemoteFetchResponse().
static struct SyncActionData* newActionData | ( | enum SyncRegisterActionKind | kind | ) | [static, read] |
Definition at line 186 of file SyncActions.c.
Referenced by SyncRegisterInterest(), SyncSendRootAdviseInterest(), SyncStartContentFetch(), and SyncStartNodeFetch().
static struct SyncRootDeltas* NewDeltas | ( | struct SyncRootStruct * | root | ) | [static, read] |
Definition at line 2509 of file SyncActions.c.
Referenced by SyncUpdateRoot().
static struct SyncHashCacheEntry* newNodeCommon | ( | struct SyncRootStruct * | root, | |
struct SyncNodeAccum * | nodes, | |||
struct SyncNodeComposite * | nc | |||
) | [static, read] |
Definition at line 1564 of file SyncActions.c.
Referenced by MakeNodeFromNames(), and nodeFromNodes().
static struct SyncHashCacheEntry* nodeFromNodes | ( | struct SyncRootStruct * | root, | |
struct SyncNodeAccum * | na | |||
) | [static, read] |
Definition at line 1630 of file SyncActions.c.
Referenced by UpdateAction().
static int noteHash | ( | struct SyncRootStruct * | root, | |
struct SyncHashCacheEntry * | ce, | |||
int | add, | |||
int | remote | |||
) | [static] |
Definition at line 691 of file SyncActions.c.
Referenced by SyncInterestArrived(), SyncRootAdviseResponse(), and UpdateAction().
static void purgeOldEntries | ( | struct SyncRootStruct * | root | ) | [static] |
Definition at line 1347 of file SyncActions.c.
Referenced by SyncInterestArrived().
static int RemRootDeltas | ( | struct SyncRootStruct * | root, | |
struct SyncRootDeltas * | deltas | |||
) | [static] |
Definition at line 2537 of file SyncActions.c.
Referenced by SendDeltasReply().
static int reportExclude | ( | struct SyncRootStruct * | root, | |
struct ccn_buf_decoder * | d | |||
) | [static] |
Definition at line 408 of file SyncActions.c.
Referenced by SyncInterestArrived().
static struct SyncRootDeltas* scanDeltas | ( | struct SyncRootStruct * | root, | |
struct SyncHashCacheEntry * | ceR | |||
) | [static, read] |
Definition at line 2677 of file SyncActions.c.
Referenced by SyncInterestArrived().
static struct SyncHashInfoList* scanRemoteSeen | ( | struct SyncRootStruct * | root, | |
struct SyncHashCacheEntry * | ceR | |||
) | [static, read] |
Definition at line 2632 of file SyncActions.c.
Referenced by UpdateAction().
static int SendDeltasReply | ( | struct SyncRootStruct * | root, | |
struct SyncRootDeltas * | deltas | |||
) | [static] |
Definition at line 2565 of file SyncActions.c.
Referenced by SyncInterestArrived(), and UpdateAction().
static void setCovered | ( | struct SyncHashCacheEntry * | ce | ) | [static] |
Definition at line 329 of file SyncActions.c.
Referenced by doComparison(), ensureRemoteEntry(), isCovered(), newNodeCommon(), and noteHash().
static int showCacheEntry | ( | struct SyncRootStruct * | root, | |
char * | dst, | |||
int | lim, | |||
char * | prefix, | |||
struct SyncHashCacheEntry * | ce | |||
) | [static] |
Definition at line 160 of file SyncActions.c.
Referenced by showCacheEntry1(), and showCacheEntry2().
static void showCacheEntry1 | ( | struct SyncRootStruct * | root, | |
char * | here, | |||
char * | msg, | |||
struct SyncHashCacheEntry * | ce | |||
) | [static] |
Definition at line 169 of file SyncActions.c.
Referenced by SyncInterestArrived(), SyncRemoteFetchResponse(), SyncSendRootAdviseInterest(), and SyncStartNodeFetch().
static void showCacheEntry2 | ( | struct SyncRootStruct * | root, | |
char * | here, | |||
char * | msg, | |||
struct SyncHashCacheEntry * | ce1, | |||
struct SyncHashCacheEntry * | ce2 | |||
) | [static] |
Definition at line 177 of file SyncActions.c.
Referenced by SendDeltasReply(), SyncInterestArrived(), SyncRootAdviseResponse(), and UpdateAction().
static struct SyncNameAccum* sortNames | ( | struct SyncRootStruct * | root, | |
struct SyncNameAccum * | src | |||
) | [static, read] |
Definition at line 371 of file SyncActions.c.
Referenced by exclusionsFromHashList().
static int storeStablePoint | ( | struct SyncBaseStruct * | base, | |
ccnr_hwm | point | |||
) | [static] |
Definition at line 1310 of file SyncActions.c.
Referenced by HeartbeatAction().
int SyncAddName | ( | struct SyncBaseStruct * | base, | |
struct ccn_charbuf * | name, | |||
ccnr_accession | item | |||
) |
Adds the given name to any applicable roots.
Use item == 0 to ignore accession number.
Definition at line 2293 of file SyncActions.c.
static struct SyncActionData* SyncFindAction | ( | struct SyncRootStruct * | root, | |
enum SyncRegisterActionKind | kind | |||
) | [static, read] |
Definition at line 2283 of file SyncActions.c.
Referenced by SyncSendRootAdviseInterest().
int SyncHandleSlice | ( | struct SyncBaseStruct * | base, | |
struct ccn_charbuf * | name | |||
) |
Creates a new slice from a full name.
The name must start with base->priv->sliceCmdPrefix.
Definition at line 2388 of file SyncActions.c.
enum ccn_upcall_res SyncInterestArrived | ( | struct ccn_closure * | selfp, | |
enum ccn_upcall_kind | kind, | |||
struct ccn_upcall_info * | info | |||
) |
Definition at line 2687 of file SyncActions.c.
static int SyncRegisterInterest | ( | struct SyncRootStruct * | root, | |
enum SyncRegisterActionKind | kind | |||
) | [static] |
Definition at line 2974 of file SyncActions.c.
Referenced by SyncRegisterInterests().
int SyncRegisterInterests | ( | struct SyncRootStruct * | root | ) |
registers interests associated with the given root these include C1.S.RA (Root Advise) and C1.S.NF (Node Fetch) interests additional interests may be registered as the protocol evolves
Definition at line 3011 of file SyncActions.c.
enum ccn_upcall_res SyncRemoteFetchResponse | ( | struct ccn_closure * | selfp, | |
enum ccn_upcall_kind | kind, | |||
struct ccn_upcall_info * | info | |||
) |
Definition at line 1959 of file SyncActions.c.
enum ccn_upcall_res SyncRootAdviseResponse | ( | struct ccn_closure * | selfp, | |
enum ccn_upcall_kind | kind, | |||
struct ccn_upcall_info * | info | |||
) |
Definition at line 3065 of file SyncActions.c.
Referenced by SyncSendRootAdviseInterest().
int SyncSendRootAdviseInterest | ( | struct SyncRootStruct * | root | ) |
send a root advise request for the given root only one at a time may be outstanding
Definition at line 3218 of file SyncActions.c.
Referenced by HeartbeatAction(), and UpdateAction().
int SyncStartCompareAction | ( | struct SyncRootStruct * | root, | |
struct ccn_charbuf * | hashR | |||
) |
initiates a compare action with the given remote hash
Definition at line 3921 of file SyncActions.c.
int SyncStartContentFetch | ( | struct SyncRootStruct * | root, | |
struct ccn_charbuf * | name, | |||
struct SyncCompareData * | comp | |||
) |
starts a remote fetch of the given name comp may be NULL if this is not for a compare
Definition at line 2225 of file SyncActions.c.
Referenced by CompareAction().
int SyncStartHeartbeat | ( | struct SyncBaseStruct * | base | ) |
starts a periodic wakeup that maintains state across all roots
Definition at line 1904 of file SyncActions.c.
int SyncStartNodeFetch | ( | struct SyncRootStruct * | root, | |
struct SyncHashCacheEntry * | ce, | |||
struct SyncCompareData * | comp | |||
) |
starts a remote fetch of the given node, based on the hash comp may be NULL if this is not for a compare
Definition at line 2146 of file SyncActions.c.
int SyncStartSliceEnum | ( | struct SyncRootStruct * | root | ) |
starts a slice enumeration for the root
Definition at line 1693 of file SyncActions.c.
static int SyncTreeMergeNames | ( | struct SyncTreeWorkerHead * | head, | |
struct SyncUpdateData * | ud | |||
) | [static] |
Definition at line 3486 of file SyncActions.c.
Referenced by UpdateAction().
int SyncUpdateRoot | ( | struct SyncRootStruct * | root | ) |
updates the root with the current root->namesToAdd
Definition at line 3873 of file SyncActions.c.
Referenced by HeartbeatAction(), and testReadBuilder().
static int TryNodeSplit | ( | struct SyncUpdateData * | ud | ) | [static] |
Definition at line 3366 of file SyncActions.c.
Referenced by AddUpdateName().
static int UpdateAction | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
Definition at line 3628 of file SyncActions.c.
Referenced by SyncUpdateRoot().
int adviseNeedReset = 1 [static] |
Definition at line 51 of file SyncActions.c.
Referenced by HeartbeatAction(), SyncInterestArrived(), SyncRegisterInterests(), and UpdateAction().
int cacheCleanBatch = 16 [static] |
Definition at line 49 of file SyncActions.c.
Referenced by HeartbeatAction().
int cacheCleanDelta = 8 [static] |
Definition at line 50 of file SyncActions.c.
Referenced by HeartbeatAction().
int cachePurgeTrigger = 60 [static] |
Definition at line 48 of file SyncActions.c.
Referenced by purgeOldEntries().
int compareAssumeBad = 20 [static] |
Definition at line 55 of file SyncActions.c.
Referenced by HeartbeatAction().
int exclusionLimit = 600 [static] |
Definition at line 57 of file SyncActions.c.
Referenced by exclusionsFromHashList().
int exclusionTrig = 5 [static] |
Definition at line 58 of file SyncActions.c.
Referenced by exclusionsFromHashList().
int hashSplitTrigger = 17 [static] |
Definition at line 60 of file SyncActions.c.
Referenced by TryNodeSplit().
int namesYieldInc = 100 [static] |
Definition at line 61 of file SyncActions.c.
Referenced by SyncTreeMergeNames(), and UpdateAction().
int namesYieldMicros = 20*1000 [static] |
Definition at line 62 of file SyncActions.c.
Referenced by SyncTreeMergeNames(), and UpdateAction().
int nDeltasLimit = 4 [static] |
Definition at line 47 of file SyncActions.c.
Referenced by SendDeltasReply().
int nodeSplitTrigger = 4000 [static] |
Definition at line 56 of file SyncActions.c.
Referenced by AddUpdateName(), newNodeCommon(), nodeFromNodes(), and TryNodeSplit().
int shortDelayMicros = 1000 [static] |
Definition at line 54 of file SyncActions.c.
Referenced by CompareAction(), HeartbeatAction(), kickCompare(), and UpdateAction().
int showHighLevel = 1 [static] |
Definition at line 46 of file SyncActions.c.
Referenced by SendDeltasReply(), SyncInterestArrived(), SyncRemoteFetchResponse(), SyncRootAdviseResponse(), SyncSendRootAdviseInterest(), SyncStartNodeFetch(), and UpdateAction().
int stableTimeTrig = 10 [static] |
Definition at line 59 of file SyncActions.c.
Referenced by HeartbeatAction().
char* syncStableSuffix = "SyncStable" [static] |
Definition at line 63 of file SyncActions.c.
Referenced by fetchStablePoint(), and storeStablePoint().
int updateNeedDelta = 6 [static] |
Definition at line 53 of file SyncActions.c.
Referenced by HeartbeatAction().
int updateStallDelta = 15 [static] |
Definition at line 52 of file SyncActions.c.
Referenced by HeartbeatAction().
int useCompExcl = 1 [static] |
Definition at line 45 of file SyncActions.c.
Referenced by SyncInterestArrived().