Checkpoint tables currenntly loaded in the TIBCO Patterns Engine.
Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)
Syntax
Visual Basic (Declaration) |
---|
Public�Function�checkpoint(�_� ���ByVal�tblnames�As�String()�_� )�As�String()�_ ����Implements�INetricsServerInterface.checkpoint |
C# |
---|
public�string[]�checkpoint( ���string[]�tblnames ) |
C++ |
---|
public: �array<String>^�checkpoint( ���array<String>^�tblnames )�sealed� |
J# |
---|
public�string[]�checkpoint( ���string[]�tblnames ) |
JScript |
---|
public�
function�checkpoint( ���tblnames�:�String[] )�:�String[] |
Parameters
- tblnames
- The names of the tables to be checkpointed. Pass null to checkpoint all tables currently in the server.
Return Value
An array of the names of the tables that were successfully checkpointed.
Implements
INetricsServerInterface.checkpoint
Exceptions
Exception Type | Condition |
---|---|
NetricsException | If the server indicates that an error has occured (Possible errors - DBPARAM, NODBDESC, EXPECTDBDESC, DUPDBDESCS, FEATURESET, DBNOTFOUND, PARTIALCHPT, CHPTFAILED, INTERNAL, NOSYSINIT) |
Remarks
Checkpointing a table allows the table to be restored to the state it was in at the time of the checkpoint. A checkpoint is made to a permanent file store, so checkpoints can be restored across different server invocations. A checkpoint restore is the fastest way to load a table.
In order to checkpoint a file the server must have been started with checkpointing enabled. See the server user's manual for information on how to enable checkpointing.
If one or more of the named tables do not exists a NetricsException is thrown with an error code of DBNOTFOUND. All tables that were found are checkpointed.
If some, but not all, of the tables fail to checkpoint for any other reason a NetricsException is thrown with error code PARTIALCHPT. Again some tables may have checkpointed successfully in this case.
If all tables fail to checkpoint correctly and not all of them failed because the named table didn't exist a NetricsException is thrown with error code CHPTFAILED. The extended error item will be a generic list containing the DBDESCRIPTOR for each table that failed to checkpoint correctly for any reason.
Example
This sample code shows how to checkpoint the "names" table on the TIBCO Patterns Engine running on the localhost listening to port 5051.
� | ![]() |
---|---|
using System; 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); String[] tableList = { "names" }; si.checkpoint(tableList); Console.Write("Table checkpointed.\n"); } catch (NetricsException e) { Console.Write(e.getErrorDescription() + "\n"); } } } |