Author: adrian.chadd
Date: Sun Apr 5 02:24:50 2009
New Revision: 13915
Modified:
branches/LUSCA_HEAD/src/store_client.c
Log:
Continue documenting the store client code a little more.
Modified: branches/LUSCA_HEAD/src/store_client.c
==============================================================================
--- branches/LUSCA_HEAD/src/store_client.c (original)
+++ branches/LUSCA_HEAD/src/store_client.c Sun Apr 5 02:24:50 2009
@@ -118,6 +118,20 @@
}
#endif
+/*...@!
+ * @function
+ * storeClientType
+ * @abstract
+ * Determine what kind of store client should be for a given StoreEntry.
+ * @discussion
+ * The logic is mostly straightforward. If the object is on disk
+ * then it may be a store disk client. If the object isn't yet
+ * on disk then it can't be made a disk client (as the data may
+ * not yet be on disk, and creation of the swap file may fail.
+ *
+ * @param e StoreEntry to use when making the client type decision
+ * @return one of STORE_DISK_CLIENT, STORE_MEM_CLIENT
+ */
static store_client_t
storeClientType(StoreEntry * e)
{
@@ -169,6 +183,10 @@
* The caller must make the judgement call whether to create a
* new StoreClient for the given StoreEntry, or to register the
* StoreEntry with an existing StoreClient.
+ *
+ * The store client type is determined at this point and will
+ * remain constant for the lifetime of the store client.
+ *
* @param
* e StoreEntry to reigster
* owner The "owner" (TODO: used for debugging, but how/when?)
@@ -202,6 +220,23 @@
return sc;
}
+/*!
+ * @function
+ * storeClientCallback
+ * @abstract
+ * Schedule a callback with the given size to the registered client
callback
+ * @discussion
+ * Since the called code may initiate another callback, the current
callback
+ * details are first NULLed out before hand.
+ *
+ * Call the callback with minimum based on size and copysize, just in case
+ * the calling code doesn't handle being given a larger buffer.
+ *
+ * This routine unlocks the callback data supplied in storeClientRef().
+ *
+ * @param sc store client to notify
+ * @param sz size to return, -1 on error, 0 on EOF? or?
+ */
static void
storeClientCallback(store_client * sc, ssize_t sz)
{
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---