Modified: incubator/trafficserver/site/trunk/docs/sdk/INKCacheRead.html URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/INKCacheRead.html?rev=882316&r1=882315&r2=882316&view=diff ============================================================================== --- incubator/trafficserver/site/trunk/docs/sdk/INKCacheRead.html (original) +++ incubator/trafficserver/site/trunk/docs/sdk/INKCacheRead.html Thu Nov 19 21:58:27 2009 @@ -1,43 +1,43 @@ - + INKCacheRead - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -45,7 +45,7 @@
Home -

Traffic Server Software Developers Kit

+

Traffic Server Software Developers Kit

Modified: incubator/trafficserver/site/trunk/docs/sdk/INKCacheWrite.html URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/INKCacheWrite.html?rev=882316&r1=882315&r2=882316&view=diff ============================================================================== --- incubator/trafficserver/site/trunk/docs/sdk/INKCacheWrite.html (original) +++ incubator/trafficserver/site/trunk/docs/sdk/INKCacheWrite.html Thu Nov 19 21:58:27 2009 @@ -1,43 +1,43 @@ - + INKCacheWrite - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -45,7 +45,7 @@
Home -

Traffic Server Software Developers Kit

+

Traffic Server Software Developers Kit

Initiates writing an object to the Traffic Server cache.

-
Prototype
+
Prototype

INKAction INKCacheWrite (INKCont contp, INKCacheKey key)

-
Arguments
+
Arguments

INKCont - contp is the - continuation that the cache calls back (telling it whether the - write operation can proceed or not).

+ contp is the + continuation the cache calls back (telling it whether the + write operation can proceed).

INKCacheKey - key is the cache key - corresponding to the object to be cached.

+ key is the cache key + that corresponds to the object to be cached.

-
Description
+
Description

Asks the Traffic Server cache if - contp can start writing + contp can start writing the object (corresponding to key) to the cache.

-

If the object can be written, the cache calls - contp back with the +

If the object can be written, then the cache calls + contp back with the event INK_EVENT_CACHE_OPEN_WRITE. In this case, the - cache also passes contp - a cache vconnection in the void *edata argument and - contp can then initiate + cache also passes contp + a cache vconnection in the void *edata argument; + contp can then initiate a write operation on that vconnection using INKVConnWrite. The object is not committed - to the cache until the vconnection is closed.

-

If the object cannot be written, the cache calls - contp back with the + to cache until the vconnection is closed.

+

If the object cannot be written, then the cache calls + contp back with the event INK_EVENT_CACHE_OPEN_WRITE_FAILED. This can happen, for example, if there is another object with the same key being written to the cache. An error code is passed in the @@ -96,9 +96,11 @@ contp. The error code can be:

    -
  • INK_CACHE_ERROR_NOT_READY: Trying to - access to the cache while it's not yet initialized.

  • -
  • INK_CACHE_ERROR_DOC_BUSY: Trying to write +

  • +

    INK_CACHE_ERROR_NOT_READY: trying to + access to the cache before it's initialized.

  • +
  • +

    INK_CACHE_ERROR_DOC_BUSY: trying to write a document while another continuation is writing or reading it.

  • Any other value: unknown write failure.

  • @@ -113,11 +115,11 @@ vconnection for any data transfer. When all data has been transferred, the user must do a INKVConnClose. In case of any errors, the - user must do an INKVConnAbort(contp, - 0).

    + user must do an INKVConnAbort(contp, + 0).

    - +
    [Note][Note] Note
    @@ -127,23 +129,21 @@ call.

    INKCacheWrite does not overwrite content already stored in the cache under the same cache key. - If you try to do so, the cache returns + If you try to do so, then the cache returns INK_EVENT_CACHE_OPEN_WRITE_FAILED. To overwrite content, first call INKCacheRemove to - remove the content, then call + remove the content and then call INKCacheWrite.

-
Returns
+
Returns

An INKAction object if successful.

INK_ERROR_PTR if an argument is incorrect or the API fails.

-
First Release
-

Traffic Server 5.2

Modified: incubator/trafficserver/site/trunk/docs/sdk/INKConfigGet.html URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/INKConfigGet.html?rev=882316&r1=882315&r2=882316&view=diff ============================================================================== --- incubator/trafficserver/site/trunk/docs/sdk/INKConfigGet.html (original) +++ incubator/trafficserver/site/trunk/docs/sdk/INKConfigGet.html Thu Nov 19 21:58:27 2009 @@ -1,43 +1,43 @@ - + INKConfigGet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -45,7 +45,7 @@
Home -

Traffic Server Software Developers Kit

+

Traffic Server Software Developers Kit

Returns a pointer to the Traffic Server configuration.

-
Prototype
+
Prototype

INKConfig INKConfigGet (unsigned int id)

-
Description
+
Description

Retrieves the current configuration pointer associated with the configuration identifier @@ -76,15 +76,13 @@ pointer.

Before you call INKConfigGet, you must set the identifier - id to some plugin - configuration data using INKConfigSet. See - the code snippet in the previous section.

+ id to some plugin + configuration data using INKConfigSet (see + code snippet in the previous section).

-
Returns
+
Returns

A pointer to the current Traffic Server configuration.

-
First release
-

Traffic Server 3.0

Modified: incubator/trafficserver/site/trunk/docs/sdk/INKConfigRelease.html URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/INKConfigRelease.html?rev=882316&r1=882315&r2=882316&view=diff ============================================================================== --- incubator/trafficserver/site/trunk/docs/sdk/INKConfigRelease.html (original) +++ incubator/trafficserver/site/trunk/docs/sdk/INKConfigRelease.html Thu Nov 19 21:58:27 2009 @@ -1,43 +1,43 @@ - + INKConfigRelease - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -45,7 +45,7 @@
Home -

Traffic Server Software Developers Kit

+

Traffic Server Software Developers Kit

Releases a configuration pointer.

-
Prototype
+
Prototype

void INKConfigRelease (unsigned int id, INKConfig configp)

-
Description
-

Releases the configuration pointer - configp on the +

Description
+
+

Releases the configuration pointer + configp on the configuration associated with the identifier id. It is possible that - configp is no longer the - current configuration in which case + configp is no longer the + current configuration, in which case INKConfigRelease may end up calling the - configuration’s destroy function. See the code snippet in the - previous section.

-
First release
-

Traffic Server 3.0

+ configuration’s destroy function (see code snippet in the + previous section).

Modified: incubator/trafficserver/site/trunk/docs/sdk/INKConfigSet.html URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/INKConfigSet.html?rev=882316&r1=882315&r2=882316&view=diff ============================================================================== --- incubator/trafficserver/site/trunk/docs/sdk/INKConfigSet.html (original) +++ incubator/trafficserver/site/trunk/docs/sdk/INKConfigSet.html Thu Nov 19 21:58:27 2009 @@ -1,43 +1,43 @@ - + INKConfigSet - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -45,7 +45,7 @@
Home -

Traffic Server Software Developers Kit

+

Traffic Server Software Developers Kit

Assigns an identifier to plugin configuration data.

-
Prototype
+
Prototype

unsigned int INKConfigSet (unsigned int id, void *data, INKConfigDestroyFunc funcp)

-
Arguments
+
Arguments
-

unsigned int id is - the identifier that is assigned to configuration +

unsigned int id is + the identifier assigned to configuration data. Do not use 1 or 2 - for id. Traffic Server + for id because Traffic Server internally assigns these IDs to parent and HTTP configurations. You can enter 0 as id, - and INKConfigSet will allocate an + however, and INKConfigSet will allocate an identifier for you (with a value of 3 or greater). There is an internal upper limit of 100 on id.

void - *data points to + *data points to the data that you are associating to id.

INKConfigDestroyFunc - funcp is a pointer to a - destroy function that is called when Traffic Server determines - that there are no more references to data. The only argument of - funcp is - data.

+ funcp is a pointer to a + destroy function that's called when Traffic Server determines + there are no more references to data. The only argument for + funcp is + data.

-
Description
+
Description

Sets the opaque data pointer - data to be associated + data to be associated with the configuration identifier id. If - id is 0 then Traffic + id is 0, then Traffic Server allocates a new configuration identifier, and INKConfigSet returns this value. If - id is non-zero, + id is non-zero, then INKConfigSet returns id. To make sure that the configuration identifier stays within the recommended range @@ -104,50 +104,46 @@ section.

- + + corruption, since the INKConfig mechanism is + also used internally by Traffic Server.

[Caution][Caution] Caution

Never pick a configuration identifier yourself. When you - need a new config id, you MUST always pass 0 as - id to the - INKConfigSet API which will return a new - valid id. It is not - safe to pick up a randomly selected id because there might be - some conflict with ids + need a new config ID, you must always pass 0 as id to the + INKConfigSet API (which will return a new + valid id). It is not + safe to pick up a randomly-selected id because there might be + some conflict with ones already in use by Traffic Server. This can cause severe memory - corruption as the INKConfig mechanism is - also used internally by Traffic Server.

-

The funcp - parameter is a pointer to a destroy function which will be +

The funcp + parameter is a pointer to a destroy function that is called with data as its - only parameter when Traffic Server determines that there are no + only parameter when Traffic Server determines there are no more references to data.

- + - +
[Note][Note] Note

data will not be - destroyed while it is the current piece of configuration data - since the current data always has a reference count of at - least 1.

Since the current data always has a reference count of at least 1, data will not be + destroyed while it is the current piece of configuration data.

See the code snippet in the previous section for usage.

-
Returns
-

The unsigned int that was assigned to the data. If the - input id is 0 then a new - configuration identifier is allocated (of value 3 or larger). If - the input id is 0, the +

Returns
+
+

The unsigned int that was assigned to the data. If the + input id is 0, then a new + configuration identifier is allocated (with value 3 or larger). If + the input id is 0, then the return value is the available identifier allocated by Traffic - Server. If id is - non-zero, the return value is - id.

-
First release
-

Traffic Server 3.0

+ Server. If id is + non-zero, then the return value is + id.