Prechádzať zdrojové kódy

htable: documented sht_reset(...)

Elena-Ramona Modroiu 11 rokov pred
rodič
commit
309b25afb3
2 zmenil súbory, kde vykonal 50 pridanie a 14 odobranie
  1. 30 14
      modules/htable/README
  2. 20 0
      modules/htable/doc/htable_admin.xml

+ 30 - 14
modules/htable/README

@@ -58,8 +58,9 @@ Ovidiu Sas
               4.1. sht_print()
               4.2. sht_rm_name_re(htable=>regexp)
               4.3. sht_rm_value_re(htable=>regexp)
-              4.4. sht_lock(htable=>key)
-              4.5. sht_unlock(htable=>key)
+              4.4. sht_reset(htable)
+              4.5. sht_lock(htable=>key)
+              4.6. sht_unlock(htable=>key)
 
         5. Exported pseudo-variables
         6. MI Commands
@@ -105,8 +106,9 @@ Ovidiu Sas
    1.17. sht_print usage
    1.18. sht_rm_name_re usage
    1.19. sht_rm_value_re usage
-   1.20. sht_lock usage
-   1.21. sht_unlock usage
+   1.20. sht_reset usage
+   1.21. sht_lock usage
+   1.22. sht_unlock usage
 
 Chapter 1. Admin Guide
 
@@ -140,8 +142,9 @@ Chapter 1. Admin Guide
         4.1. sht_print()
         4.2. sht_rm_name_re(htable=>regexp)
         4.3. sht_rm_value_re(htable=>regexp)
-        4.4. sht_lock(htable=>key)
-        4.5. sht_unlock(htable=>key)
+        4.4. sht_reset(htable)
+        4.5. sht_lock(htable=>key)
+        4.6. sht_unlock(htable=>key)
 
    5. Exported pseudo-variables
    6. MI Commands
@@ -445,8 +448,8 @@ $ kamcmd htable.dump htable
 ...
 modparam("htable", "htable", "a=>size=4;autoexpire=7200;dbtable=htable_a;")
 modparam("htable", "htable", "b=>size=5;")
-modparam("htable", "htable", "c=>size=4;autoexpire=7200;initval=1;dmqreplicate=
-1;")
+modparam("htable", "htable", "c=>size=4;autoexpire=7200;initval=1;dmqreplicate=1
+;")
 ...
 
 3.2. db_url (str)
@@ -600,8 +603,9 @@ modparam("htable", "enable_dmq", 1)
    4.1. sht_print()
    4.2. sht_rm_name_re(htable=>regexp)
    4.3. sht_rm_value_re(htable=>regexp)
-   4.4. sht_lock(htable=>key)
-   4.5. sht_unlock(htable=>key)
+   4.4. sht_reset(htable)
+   4.5. sht_lock(htable=>key)
+   4.6. sht_unlock(htable=>key)
 
 4.1.  sht_print()
 
@@ -642,24 +646,36 @@ sht_rm_name_re("ha=>.*");
 sht_rm_value_re("ha=>.*");
 ...
 
-4.4.  sht_lock(htable=>key)
+4.4.  sht_reset(htable)
+
+   Delete all entries in the htable. The name of the hash table can be a
+   dynamic string with variables.
+
+   This function can be used from ANY_ROUTE.
+
+   Example 1.20. sht_reset usage
+...
+sht_reset("ha$var(x)");
+...
+
+4.5.  sht_lock(htable=>key)
 
    Lock the slot in htable corespoding to the key item.
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.20. sht_lock usage
+   Example 1.21. sht_lock usage
 ...
 sht_lock("ha=>test");
 ...
 
-4.5.  sht_unlock(htable=>key)
+4.6.  sht_unlock(htable=>key)
 
    Unlock the slot in htable corespoding to the key item.
 
    This function can be used from ANY_ROUTE.
 
-   Example 1.21. sht_unlock usage
+   Example 1.22. sht_unlock usage
 ...
 sht_lock("ha=>test");
 $sht(ha=>test) = $sht(ha=>test) + 10;

+ 20 - 0
modules/htable/doc/htable_admin.xml

@@ -707,6 +707,26 @@ sht_rm_name_re("ha=>.*");
 ...
 sht_rm_value_re("ha=>.*");
 ...
+</programlisting>
+		</example>
+	</section>
+	<section id="htable.f.sht_reset">
+		<title>
+		<function moreinfo="none">sht_reset(htable)</function>
+		</title>
+		<para>
+			Delete all entries in the htable. The name of the hash table
+			can be a dynamic string with variables.
+		</para>
+		<para>
+			This function can be used from ANY_ROUTE.
+		</para>
+		<example>
+		<title><function>sht_reset</function> usage</title>
+		<programlisting format="linespecific">
+...
+sht_reset("ha$var(x)");
+...
 </programlisting>
 		</example>
 	</section>