Update Validators for ServiceQueue

This commit is contained in:
Vinnie Falco
2013-09-27 13:44:01 -07:00
parent 3ec36929f1
commit 6602aff53d
15 changed files with 101 additions and 211 deletions

View File

@@ -52,9 +52,6 @@ public:
virtual String createParam () = 0;
/** Fetch the most recent list from the Source.
If possible, the Source should periodically poll the
CancelCallback, and abort the operation if shouldCancel
returns `true`.
This call will block.
*/
struct Result
@@ -67,8 +64,12 @@ public:
Time expirationTime;
Array <Info> list;
};
virtual Result fetch (CancelCallback& callback, Journal journal) = 0;
/** Cancel any pending fetch.
The default implementation does nothing.
*/
virtual void cancel () { }
virtual Result fetch (Journal journal) = 0;
};
}

View File

@@ -31,12 +31,6 @@ struct ReceivedValidation
RipplePublicKeyHash publicKeyHash;
};
/** Callback used to optionally cancel long running fetch operations. */
struct CancelCallback
{
virtual bool shouldCancel () = 0;
};
}
}