A version of recget which does not require a lock key.


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

Syntax

Visual Basic (Declaration)
Public Function recget( _ 
   ByVal tblName As String,  _ 
   ByVal recKeys As String() _ 
) As NetricsRecord() _
    Implements INetricsServerInterface.recget
C#
public NetricsRecord[] recget(
   string tblName,
   string[] recKeys
)
C++
public:
 array<NetricsRecord>^ recget(
   String tblName,
   array<String>^ recKeys
) sealed 
J#
public NetricsRecord[] recget(
   string tblName,
   string[] recKeys
)
JScript
public  function recget(
   tblName : String,
   recKeys : String[]
) : NetricsRecord[]

Implements

INetricsServerInterface.recget

Example

This sample shows how to get/read records from a TIBCO Patterns Engine table.

 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);
                        // Target TIBCO Patterns Engine table
                        String table = "names";
                        // Record keys of records to be gotten
                        String[] recKeys = { "1", "2" };
                        NetricsRecord[] response = si.recget(table, recKeys);
                        // keyField of record returned from recget
                        String keyField = null;
                        // data fields returned from recget
                        String[] data = null;
                        // Write the data out to the console
                        for (int i = 0; i < response.Length; i++)
                        {
                            keyField = response[i].getKey();
                            data = response[i].getFields();
                            Console.Write("key=" + keyField + " : Data=" + String.Join(",", data) + "\n");
                        }
                    }
                    catch (NetricsException e)
                    {
                        Console.Write(e.getErrorDescription() + "\n");
                    }
                  }
               }
             

See Also