Lists statistics for tables currently loaded in the ibi™ Patterns - Search Server.


Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)

Syntax

Visual Basic (Declaration)
Public Function list( _ 
   ByVal tblnames As String() _ 
) As NetricsTableStats()
C#
public NetricsTableStats[] list(
   string[] tblnames
)
C++
public:
 array<NetricsTableStats>^ list(
   array<String>^ tblnames
) sealed 
J#
public NetricsTableStats[] list(
   string[] tblnames
)
JScript
public  function list(
   tblnames : String[]
) : NetricsTableStats[]

Parameters

tblnames
The names of the tables for which to receive statistics. Pass null to recieve a NetricsTableStats object for every table currently loaded

Return Value

An array of NetricsTableStats objects, one per requested table

Exceptions

Exception TypeCondition
NetricsExceptionIf the server indicates that an error has occured (Possible errors - TBLNOTFOUND, EXPECTTBLDESC, EXPECTLIST, FEATURESET, NOTBLDESC, NOSYSINIT)

Example

This sample shows how to turn off debugging on the client side.

 Copy Code
             using NetricsServerInterface;  
             class MyClass 
               {
                 private static NetricsServerInterface.NetricsServerInterface si = null;     
                 public static void Main() 
                  {
                    try
                    {
                        String host = "localhost";
                        int port = 5051;
                        si = new NetricsServerInterface.NetricsServerInterface(host, port);
                        // Get stats on all tables by using null
                        NetricsTableStats[] response = si.list(null);
                        String s = "";
                        // Iterate through the response array to get each table's stats and write the number of records
                        for (int i = 0; i < response.Length; i++)
                        {
                            s = s + response[i].getName() + ": " + response[i].getNumRecs().ToString() + " records\n";
                        }
                        if (response.Length > 0)
                            Console.Write(s);
                        else
                            Console.WriteLine("No tables loaded");
                    }
                    catch (NetricsException e)
                    {
                        Console.Write(e.getErrorDescription() + "\n");
                    }
                  }
               }
             

See Also