public class NetricsServerInterface
extends java.lang.Object
All interactions with the TIBCO Patterns Engine are performed using objects of this class or the NetricsTransactions class, which is an extension of this class. All operations on the TIBCO Patterns Engine are exposed as methods of objects of this class.
The method calls used to perform operations on the TIBCO Patterns Engine do not retain any state, all information is maintained on the TIBCO Patterns Engine itself. Because these methods are stateless they are thread safe. However these objects do maintain certain connection information. Methods which update this information are NOT thread safe. These methods include: DebuggingOn, DebuggingOff, setServerLocale, setCharset, setConnectionPoolingPolicy and selectLayout. None of these methods should ever be called on an object being shared by multiple threads.
See the Overview for an example of how to use this interface.
| Modifier and Type | Field and Description |
|---|---|
static int |
ConnectionPoolingCommon
Use a pool shared with other NetricsServerInterface objects.
|
static int |
ConnectionPoolingLocal
Use a separate pool for this NetricsServerInterface object.
|
static int |
ConnectionPoolingNone
Do not use connection pooling.
|
| Constructor and Description |
|---|
NetricsServerInterface(boolean debug)
Create an object for interacting with the Embedded TIBCO Patterns Server.
|
NetricsServerInterface(java.lang.String host,
int port)
Create an object for interacting with a Netrics Server.
|
NetricsServerInterface(java.lang.String host,
int port,
boolean debug)
Create an object for interacting with a Netrics Server.
|
NetricsServerInterface(java.lang.String host,
int port,
boolean debug,
boolean log4j)
Create an object for interacting with a Netrics Server.
|
| Modifier and Type | Method and Description |
|---|---|
NetricsTableStats |
addRecsFromFile(java.lang.String tblname,
boolean replaceNotAdd,
NetricsLock lock,
NetricsRecFile fileDef)
Add or replace records from a file.
|
NetricsTableStats |
addRecsFromFile(java.lang.String tblName,
java.lang.String encoding,
java.lang.String fileName,
boolean doMaxWork,
int[] fieldLengths,
boolean leadingKey,
int initialKey,
boolean fieldNamesFirst,
boolean replaceNotAdd)
Deprecated.
As of release 4.4.3. Use
addRecsFromFile(String,boolean,NetricsLock,NetricsRecFile) |
NetricsTableStats |
addRecsFromFile(java.lang.String tblName,
java.lang.String encoding,
java.lang.String fileName,
boolean doMaxWork,
int[] fieldLengths,
boolean leadingKey,
int initialKey,
boolean fieldNamesFirst,
boolean fieldTypesFirst,
boolean replaceNotAdd,
NetricsLock lock)
Deprecated.
As of release 4.4.3. Use
addRecsFromFile(String,boolean,NetricsLock,NetricsRecFile) |
NetricsTableStats |
addRecsFromFile(java.lang.String tblName,
java.lang.String encoding,
java.lang.String fileName,
boolean doMaxWork,
int[] fieldLengths,
boolean leadingKey,
int initialKey,
boolean fieldNamesFirst,
boolean replaceNotAdd,
NetricsLock lock)
Deprecated.
As of release 4.4.3. Use
addRecsFromFile(String,boolean,NetricsLock,NetricsRecFile) |
java.lang.String[] |
checkpoint(java.lang.String[] tblnames)
Deprecated.
|
NetricsObjectNameCollection |
checkpointObjects(NetricsObjectNameCollection objects)
Checkpoint objects (tables, thesauri, character maps, rlink models)
currently loaded in the TIBCO Patterns Server.
|
NetricsCharmapStats[] |
cmap_stats(java.lang.String[] cmap_names)
Lists statistics on character maps currently loaded on the server.
|
void |
cmapcreate(NetricsCharmap cmap)
Create a character map in the remote server.
|
java.lang.String[] |
cmaplist()
List character maps currently loaded in the TIBCO Patterns Server.
|
void |
cmdstats_reset(java.lang.String[] cmd_names,
double start_time)
Reset processing statistics for the specified commands.
|
NetricsCmdStats[] |
cmdstats(java.lang.String[] cmd_names)
Retrieve processing statistics for commands.
|
NetricsCmdStats[] |
cmdstats(java.lang.String[] cmd_names,
double duration)
Retrieve processing statistics for specified duration for commands.
|
NetricsCmdStats[] |
cmdstats(java.lang.String[] cmd_names,
double duration,
double end_time)
Retrieve processing statistics for specified time period.
|
NetricsCompoundRecord[] |
compoundNext(NetricsTableCursor cursor)
Retrieve compound records from a cursor.
|
void |
cthcreate(NetricsCombinedThesaurus cthes)
Create a combined thesaurus in the remote server.
|
void |
dbdelete(java.lang.String tblName)
Deprecated.
|
NetricsDb |
dbdump(java.lang.String tblName)
Deprecated.
use
tbldump(String) |
NetricsDb |
dbdump(java.lang.String tblName,
NetricsLock lock)
Deprecated.
|
NetricsDbStats[] |
dblist(java.lang.String[] tblnames)
Deprecated.
use
list(String[]) |
NetricsDbStats |
dbload(NetricsDb tbl)
Deprecated.
|
void |
dblock(java.lang.String tblName)
Deprecated.
use transactions to control simultaneous operations.
|
NetricsLock |
dblock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed)
Deprecated.
use transactions to control simultaneous operations.
|
NetricsLock |
dblock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed,
NetricsLock lock)
Deprecated.
use transactions to control simultaneous updates.
|
void |
dbmove(java.lang.String oldName,
java.lang.String newName)
Deprecated.
|
NetricsDbStats |
dbrecadd(java.lang.String tblName,
NetricsRecord rec)
Deprecated.
|
NetricsDbStats |
dbrecadd(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork)
Deprecated.
|
NetricsDbStats |
dbrecadd(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork,
NetricsLock lock)
Deprecated.
|
NetricsDbStats |
dbrecdelete(java.lang.String tblName,
java.lang.String recKey)
Deprecated.
|
NetricsDbStats |
dbrecdelete(java.lang.String tblName,
java.lang.String[] recKeys,
boolean doMaxWork)
Deprecated.
|
NetricsDbStats |
dbrecdelete(java.lang.String tblName,
java.lang.String[] recKeys,
boolean doMaxWork,
NetricsLock lock)
Deprecated.
|
NetricsRecord |
dbrecget(java.lang.String tblName,
java.lang.String recKey)
Deprecated.
|
NetricsRecord[] |
dbrecget(java.lang.String tblName,
java.lang.String[] recKeys)
Deprecated.
|
NetricsRecord[] |
dbrecget(java.lang.String tblName,
java.lang.String[] recKeys,
NetricsLock lock)
Deprecated.
|
NetricsDbStats |
dbrecreplace(java.lang.String tblName,
NetricsRecord rec)
Deprecated.
|
NetricsDbStats |
dbrecreplace(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork)
Deprecated.
|
NetricsDbStats |
dbrecreplace(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork,
NetricsLock lock)
Deprecated.
|
NetricsSearchResponse |
dbsearch(NetricsDbSearchCfg[] tblCfgs,
NetricsSearchOpts opts)
Deprecated.
|
NetricsSearchResponse |
dbsearch(NetricsDbSearchCfg tblCfg,
NetricsSearchOpts opts)
Deprecated.
|
void |
dbunlock(java.lang.String tblName)
Deprecated.
use transactions to control simultaneous operations.
|
void |
dbunlock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed)
Deprecated.
use transactions to control simultaneous operations.
|
void |
dbunlock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed,
NetricsLock lock)
Deprecated.
use transactions to control simultaneous operations.
|
boolean |
DebuggingOff()
Turn off debugging output.
|
boolean |
DebuggingOn()
Turn on debugging output.
|
NetricsTableStats |
delChildRecord(java.lang.String table_name,
java.lang.String parent_key,
java.lang.String child_key,
boolean doMaxWork) |
NetricsTableStats |
delChildRecords(java.lang.String table_name,
NetricsRecord.ChildType child_type,
java.lang.String[] parent_keys,
java.lang.String[] child_keys,
boolean doMaxWork)
Delete multiple records from a child table.
|
NetricsTableStats |
delChildRecords(java.lang.String table_name,
java.lang.String[] parent_keys,
java.lang.String[] child_keys,
boolean doMaxWork)
Delete multiple records from a child table.
|
NetricsTableStats[] |
delCompoundRecords(java.lang.String parent_table,
java.lang.String[] child_tables,
java.lang.String[] parent_keys,
boolean delete_orphans,
boolean doMaxWork)
Deletes a set of records from a parent table, and deletes associated
child records from child tables.
|
NetricsTableStats |
doRecOps(java.lang.String table_name,
boolean do_max_work,
NetricsRecOp... rec_ops)
Perform a mixed set of record updates.
|
NetricsTableStats |
doRecOps(java.lang.String table_name,
boolean do_max_work,
NetricsRecOpSrc rec_ops)
Perform a mixed set of record updates.
|
NetricsRecord |
getChildRecord(java.lang.String table_name,
java.lang.String parent_key,
java.lang.String child_key) |
NetricsRecord[] |
getChildRecords(java.lang.String table_name,
NetricsRecord.ChildType child_type,
java.lang.String[] parent_keys,
java.lang.String[] child_keys)
Get multiple records from a child table.
|
NetricsRecord[] |
getChildRecords(java.lang.String table_name,
NetricsRecord.ChildType child_type,
java.lang.String[] parent_keys,
java.lang.String[] child_keys,
boolean do_max_work)
Get multiple records from a child table.
|
NetricsRecord[] |
getChildRecords(java.lang.String table_name,
java.lang.String[] parent_keys,
java.lang.String[] child_keys)
Get multiple records from a child table.
|
NetricsCompoundRecord[] |
getCompoundRecords(java.lang.String parent_table,
java.lang.String[] child_tables,
java.lang.String... parent_keys)
Get multiple compound records.
|
int |
getConnectionPoolingPolicy()
Retrieve the connection pooling policy currently in use.
|
java.lang.String |
getLayout() |
NetricsIdxStats[] |
idxlist(java.lang.String[] tblnames)
Lists statistics for partitioned indexes.
|
boolean |
isDecisionEngine()
Return true if the server indicates it is a Decision Engine.
|
boolean |
isGIPEnabled()
Return true if the server indicates GIP is the default prefilter.
|
boolean |
isPsiEnabled()
Return true if the server indicates PSI is the default prefilter.
|
boolean |
isSortEnabled()
Return true if the server indicates SORT is the default prefilter.
|
NetricsTableStats[] |
list(java.lang.String[] tblnames)
Lists statistics for tables currently loaded in the TIBCO Patterns Server.
|
NetricsTranStats[] |
listTransactions(int idle_cutoff)
Returns an array of NetricsTranStats objects, one object for each
open transaction with an idle time greater than idle_cutoff.
|
void |
loadClusterConfiguration(java.lang.String file_name)
Load a new cluster configuration file on the gateway server.
|
NetricsTableStats |
recadd(java.lang.String tblName,
NetricsRecord rec)
Add a single record to a table.
|
NetricsTableStats |
recadd(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork)
A version of recadd which does not require a lock key or est records.
|
NetricsTableStats |
recadd(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork,
int estNumRecs)
A version of recadd which does not require a lock key.
|
NetricsTableStats |
recadd(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork,
NetricsLock lock)
recadd with no estimated record count.
|
NetricsTableStats |
recadd(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork,
NetricsLock lock,
int estNumRecs)
Add multiple records to a table.
|
NetricsTableStats |
recdelete(java.lang.String tblName,
java.lang.String recKey)
Delete a single record from a table.
|
NetricsTableStats |
recdelete(java.lang.String tblName,
java.lang.String[] recKeys,
boolean doMaxWork)
A version of recdelete which does not require a lock key.
|
NetricsTableStats |
recdelete(java.lang.String tblName,
java.lang.String[] recKeys,
boolean doMaxWork,
NetricsLock lock)
Delete multiple records from a table.
|
NetricsRecord |
recget(java.lang.String tblName,
java.lang.String recKey)
Get a single record from a table.
|
NetricsRecord[] |
recget(java.lang.String tblName,
java.lang.String[] recKeys)
Get multiple records from a table.
|
NetricsRecord[] |
recget(java.lang.String tblName,
java.lang.String[] recKeys,
NetricsLock lock)
Get multiple records from a table.
|
NetricsRecord[] |
recnext(NetricsTableCursor cursor)
Retrieve records from a table cursor.
|
NetricsTableStats |
recreplace(java.lang.String tblName,
NetricsRecord rec)
Replace a single existing record in a table.
|
NetricsTableStats |
recreplace(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork)
A version of recreplace which does not require a lock key.
|
NetricsTableStats |
recreplace(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork,
NetricsLock lock)
Replace a set of records in a table.
|
NetricsTableStats |
recupdate(java.lang.String tblName,
NetricsRecord rec)
Update a single existing record in a table.
|
NetricsTableStats |
recupdate(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork)
A version of recupdate which does not require a lock key.
|
NetricsTableStats |
recupdate(java.lang.String tblName,
NetricsRecSrc src,
boolean doMaxWork,
NetricsLock lock)
Update a set of records in a table.
|
java.lang.String[] |
restore(java.lang.String[] tblnames)
Deprecated.
|
NetricsObjectNameCollection |
restoreObjects(NetricsObjectNameCollection objects)
Restore objects previously checkpointed.
|
void |
rlcreate_l(java.lang.String rlModelName,
java.lang.String rlModelFile)
Equivalent to
rlcreate_l(String,String,boolean). |
void |
rlcreate_l(java.lang.String rlModelName,
java.lang.String rlModelFile,
boolean allowLargeGatewayMem)
Use this function to load a Netrics Decision Engine model under
the given name.
|
void |
rlcreate(java.lang.String rlModelName,
java.lang.String rlModelFile)
Use this function to load a Netrics Decision Engine model under
the given name.
|
void |
rldelete(java.lang.String[] modellist)
Delete one or more Netrics Decision Engine Models.
|
double |
rleval(java.lang.String rlModelName,
double[] featurevec)
Evaluate a TIBCO Patterns Learn Model with the given vector of
feature values.
|
NetricsModelStats[] |
rllist(java.lang.String[] modellist)
List information on Netrics Decision Engine models.
|
NetricsSearchResponse |
scoreRecords(NetricsQuery query,
NetricsSearchOpts query_opts,
NetricsTable rec_format,
NetricsRecord... records)
Score one or more records against a query.
|
NetricsSearchResponse |
scoreRecords(NetricsQuery query,
NetricsSearchOpts query_opts,
NetricsTable rec_format,
NetricsRecSrc rec_src)
Score all records from a record source against a query.
|
NetricsSearchResponse |
search(NetricsSearchCfg[] tblCfgs,
NetricsSearchOpts opts)
Perform a search on one or more tables.
|
NetricsSearchResponse |
search(NetricsSearchCfg tblCfg,
NetricsSearchOpts opts)
Perform a search on a single table.
|
void |
selectLayout(java.lang.String layout)
Set the current cluster layout.
|
NetricsServerStats |
server_info()
Retrieve the server version information.
|
void |
setCharset(java.lang.String charset)
Do not change this unless instructed to do so by your TIBCO
representative.
|
void |
setConnectionPoolingPolicy(int policy)
Set the connection pooling policy for this object.
|
void |
setNetProtocols(int protocols)
Set the network protocols that will be used to connect to the TIBCO
Patterns Engine.
|
java.util.Locale |
setServerLocale(java.util.Locale locale)
Sets the locale used by the interface when formatting exchanges with
the server.
|
void |
svrlogoff()
Turn off search logging (must be enabled when the server starts up).
|
void |
svrlogon()
Turn on search logging.
|
void |
svrnoop()
Perform a noop on the Netrics Server.
|
void |
svrshutdown()
Shutdown the Netrics Server.
|
java.lang.String |
svrversion()
Retrieve the version information of this interface.
|
void |
tbldelete(java.lang.String tblName)
Delete a table.
|
NetricsTable |
tbldump(java.lang.String tblName)
Deprecated.
use
recnext(NetricsTableCursor)
Version of tbldump which does not require a lock key. |
NetricsTable |
tbldump(java.lang.String tblName,
NetricsLock lock)
Deprecated.
|
NetricsTableStats |
tblload(NetricsTable tbl)
Used to load a NetricsTable into the server.
|
NetricsTableStats |
tblload(NetricsTable tbl,
boolean doMaxWork)
Used to load a NetricsTable into the server.
|
NetricsTableStats |
tblload(NetricsTable tbl,
NetricsRecFile fileDef)
Create and load a table from a server side CSV file.
|
void |
tbllock(java.lang.String tblName)
Deprecated.
use transactions to control simultaneous operations.
|
NetricsLock |
tbllock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed)
Deprecated.
use transactions to control simultaneous operations.
|
NetricsLock |
tbllock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed,
NetricsLock lock)
Deprecated.
Use transactions to control simultaneous updates.
|
void |
tblmove(java.lang.String oldName,
java.lang.String newName)
Rename a table.
|
void |
tblunlock(java.lang.String tblName)
Deprecated.
use transactions to control simultaneous operations.
|
void |
tblunlock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed)
Deprecated.
use transactions to control simultaneous operations.
|
void |
tblunlock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed,
NetricsLock lock)
Deprecated.
use transactions to control simultaneous operations.
|
void |
thcreate(NetricsThesaurus thes)
Create a thesaurus in the remote server.
|
void |
thdelete(java.lang.String[] theslist)
Delete one or more thesauri currently loaded on the server.
|
NetricsThesStats[] |
thes_stats(java.lang.String[] thes_names)
Lists statistics on thesauri currently loaded on the server.
|
java.lang.String[] |
thlist()
Lists the thesauri currently loaded in the TIBCO Patterns Server.
|
void |
tranAbort(int tran_id)
This method aborts the transaction with full transaction id tran_id.
|
void |
tranCommit(int tran_id)
This method commits the transaction with full transaction id tran_id.
|
void |
tranForceCommit(int tran_id)
This method commits the transaction with full transaction id tran_id,
forcing the commit even if there were errors.
|
void |
tranSetIdleOpts(int idle_time,
java.lang.String action)
Set the idle transaction processing parameters on the server.
|
NetricsTableStats |
updRecsFromFile(java.lang.String tblname,
NetricsLock lock,
NetricsRecFile fileDef)
Update records from a file.
|
java.lang.String |
version()
Retrieve the Netrics Server Interface version information.
|
void |
wdcreate(NetricsWeightedDictionary wdict)
Create a weighted dictionary in the remote server.
|
public static final int ConnectionPoolingNone
public static final int ConnectionPoolingLocal
public static final int ConnectionPoolingCommon
public NetricsServerInterface(java.lang.String host,
int port)
host - The hostname or IP address of the machine on which the
Netrics Server is running.port - The port number which the Netrics Server is listening onpublic NetricsServerInterface(java.lang.String host,
int port,
boolean debug)
host - The hostname or IP address of the machine on which the
Netrics Server is running.port - The port number which the Netrics Server is listening ondebug - If true output to System.out detailed information
on all interactions with the server.public NetricsServerInterface(java.lang.String host,
int port,
boolean debug,
boolean log4j)
host - The hostname or IP address of the machine on which the
Netrics Server is running.port - The port number which the Netrics Server is listening ondebug - If true output detailed information on all
interactions with the server.log4j - Dump output to log4j logger.public NetricsServerInterface(boolean debug)
debug - If true output detailed information on all
interactions with the embedded server.public boolean DebuggingOn()
Turn on very verbose debugging output. This should only be used on the advice of TIBCO support.
public boolean DebuggingOff()
Turn off debugging output. This should only be used on the advice of TIBCO support.
public void selectLayout(java.lang.String layout)
layout - new value for the current cluster layout.public java.lang.String getLayout()
public int getConnectionPoolingPolicy()
public void setConnectionPoolingPolicy(int policy)
throws NetricsException
policy - one of ConnectionPoolingNone, ConnectionPoolingLocal,
ConnectionPoolingCommon.NetricsException - if teh pooling mode is invalid.public void setCharset(java.lang.String charset)
charset - the name of a supported character set@Deprecated public NetricsDbStats dbload(NetricsDb tbl) throws java.io.IOException, NetricsException
tblload(NetricsTable)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats tblload(NetricsTable tbl) throws java.io.IOException, NetricsException
tbl - The table to be loadedNetricsException - If the server indicates that
an error has occured (Possible errors - ARRAYLEN, TBLEXISTS,
TBLPARAM, RECEXISTS, CHARMAP, DUPFIELDNAMES, EXPECTTBLDESC,
EXPECTLIST, EXPECTRECORD, FEATURESET, FIELDLENSUM, NOTBLDESC,
NORECKEY, NOSRCHTXT, NUMFIELDS, PARAMCONFLICT, PARAMVAL, SHUTDOWN)java.io.IOException - If an I/O error occursNetricsTablepublic NetricsTableStats tblload(NetricsTable tbl, boolean doMaxWork) throws java.io.IOException, NetricsException
tbl - The table to be loadeddoMaxWork - process as many records as possible, ignoring
those with errors.NetricsException - If the server indicates that
an error has occured (Possible errors - ARRAYLEN, TBLEXISTS,
TBLPARAM, RECEXISTS, CHARMAP, DUPFIELDNAMES, EXPECTTBLDESC,
EXPECTLIST, EXPECTRECORD, FEATURESET, FIELDLENSUM, NOTBLDESC,
NORECKEY, NOSRCHTXT, NUMFIELDS, PARAMCONFLICT, PARAMVAL, SHUTDOWN)java.io.IOException - If an I/O error occursNetricsTablepublic NetricsTableStats tblload(NetricsTable tbl, NetricsRecFile fileDef) throws NetricsException, java.io.IOException
tbl - Defines table to be loaded. Record source is ignored.fileDef - Defines the name and format of the file containing
the records.NetricsException - If the server indicates that an error
has occured (Possible errors - ARRAYLEN, TBLEXISTS,
TBLPARAM, RECEXISTS, CHARMAP, DUPFIELDNAMES,
EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FEATURESET,
FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS,
PARAMCONFLICT, PARAMVAL, SHUTDOWN)java.io.IOException - If an I/O error occursNetricsTable,
NetricsRecFilepublic NetricsTableStats addRecsFromFile(java.lang.String tblname, boolean replaceNotAdd, NetricsLock lock, NetricsRecFile fileDef) throws NetricsException, java.io.IOException
tblname - Defines table to be loaded.replaceNotAdd - if true this replaces existing records, if false
it adds new records.lock - A lock key for the table. May be null.fileDef - Defines the name and format of the file containing
the records.NetricsException - If the server indicates that an error
has occurred (Possible errors - ARRAYLEN, TBLEXISTS,
TBLPARAM,s RECEXISTS, CHARMAP, DUPFIELDNAMES,
EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FEATURESET,
FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS,
PARAMCONFLICT, PARAMVAL, SHUTDOWN)java.io.IOException - If an I/O error occursNetricsRecFilepublic NetricsTableStats updRecsFromFile(java.lang.String tblname, NetricsLock lock, NetricsRecFile fileDef) throws NetricsException, java.io.IOException
This will add the given records if the do not already exist, or replace them if they do exist.
tblname - Defines table to be loaded.lock - A lock key for the table. May be null.fileDef - Defines the name and format of the file containing
the records.NetricsException - If the server indicates that an error
has occured (Possible errors - ARRAYLEN, TBLEXISTS,
TBLPARAM, RECEXISTS, CHARMAP, DUPFIELDNAMES,
EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FEATURESET,
FIELDLENSUM, NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS,
PARAMCONFLICT, PARAMVAL, SHUTDOWN)java.io.IOException - If an I/O error occursNetricsRecFile@Deprecated public NetricsTableStats addRecsFromFile(java.lang.String tblName, java.lang.String encoding, java.lang.String fileName, boolean doMaxWork, int[] fieldLengths, boolean leadingKey, int initialKey, boolean fieldNamesFirst, boolean fieldTypesFirst, boolean replaceNotAdd, NetricsLock lock) throws NetricsException, java.io.IOException
addRecsFromFile(String,boolean,NetricsLock,NetricsRecFile)NetricsExceptionjava.io.IOException@Deprecated public NetricsTableStats addRecsFromFile(java.lang.String tblName, java.lang.String encoding, java.lang.String fileName, boolean doMaxWork, int[] fieldLengths, boolean leadingKey, int initialKey, boolean fieldNamesFirst, boolean replaceNotAdd) throws NetricsException, java.io.IOException
addRecsFromFile(String,boolean,NetricsLock,NetricsRecFile)NetricsExceptionjava.io.IOException@Deprecated public NetricsTableStats addRecsFromFile(java.lang.String tblName, java.lang.String encoding, java.lang.String fileName, boolean doMaxWork, int[] fieldLengths, boolean leadingKey, int initialKey, boolean fieldNamesFirst, boolean replaceNotAdd, NetricsLock lock) throws NetricsException, java.io.IOException
addRecsFromFile(String,boolean,NetricsLock,NetricsRecFile)NetricsExceptionjava.io.IOExceptionpublic void thcreate(NetricsThesaurus thes) throws java.io.IOException, NetricsException
thes - The NetricsThesaurus object to create on the remote server.
The name and synonyms of the thesaurus are defined by using
the thesaurus object's methods.java.io.IOException - If an I/O error occursNetricsException - If the server indicates that
an error has occured (Possible errors - ARRAYLEN, CHARMAP, EXPECTTHESNAME,
EXPECTLIST, FEATURESET, IOERROR, PARAMVAL, PARAMMISSING)public void cthcreate(NetricsCombinedThesaurus cthes) throws java.io.IOException, NetricsException
cthes - The NetricsCombinedThesaurus object to create on the
remote server. The name and synonyms of the thesaurus are defined
by using the thesaurus object's methods.java.io.IOException - If an I/O error occursNetricsException - If the server indicates that
an error has occured (Possible errors - ARRAYLEN, CHARMAP,
EXPECTTHESNAME, EXPECTLIST, FEATURESET, IOERROR, PARAMVAL,
PARAMMISSING)public void cmapcreate(NetricsCharmap cmap) throws java.io.IOException, NetricsException
cmap - The character map to add.java.io.IOException - If an I/O error occursNetricsException - if the transaction assocated with this
ServerInterface is closed.public void wdcreate(NetricsWeightedDictionary wdict) throws java.io.IOException, NetricsException
wdict - The NetricsWeightedDictionary object to create on the
remote server. The name and synonyms of the thesaurus
are defined by using the thesaurus object's methods.java.io.IOException - If an I/O error occursNetricsException - If the server indicates that
an error has occured (Possible errors - ARRAYLEN, CHARMAP,
EXPECTTHESNAME, EXPECTLIST, FEATURESET, IOERROR, PARAMVAL,
PARAMMISSING)public void rlcreate(java.lang.String rlModelName,
java.lang.String rlModelFile)
throws java.io.IOException,
NetricsException
rlModelName - The name the model will be loaded under.rlModelFile - The location of the model file on the TIBCO Patterns
server's file system.java.io.IOException - If an I/O error occursNetricsException - if the transaction associated with this
ServerInterface is closed.NetricsSearchOpts.setRlModelName(java.lang.String)public void rlcreate_l(java.lang.String rlModelName,
java.lang.String rlModelFile,
boolean allowLargeGatewayMem)
throws java.io.IOException,
NetricsException
rlModelName - The name the model will be loaded under.rlModelFile - The location of the model file.allowLargeGatewayMem - If loading into a cluster, enabling this flag
allows the gateway to temporarily store the model in memory. If
the flag is not enabled, the gateway will temporarily store the
model in a file. In this case, if the gateway is not configured
with a temporary storage directory, a FEATURESET error is
returned. Enabling this flag when loading extremely large
models (> 50 MB) will return a PARAMVAL error.
This flag is ignored when not loading to a cluster.NetricsException - if the transaction associated with this
ServerInterface is closed.java.io.IOException - If an I/O error occursNetricsSearchOpts.setRlModelName(java.lang.String)public void rlcreate_l(java.lang.String rlModelName,
java.lang.String rlModelFile)
throws java.io.IOException,
NetricsException
rlcreate_l(String,String,boolean).java.io.IOExceptionNetricsExceptionpublic NetricsModelStats[] rllist(java.lang.String[] modellist) throws java.io.IOException, NetricsException
This lists basic information on one or more Netrics Decision Engine Models currently loaded on the Netrics server.
If any of the model names given are not on the engine a NetricsException error is thrown with a code of RLINKMODELNOTFOUND.
modellist - The names of the models to be listed.
Pass null to list all models on the server.
NetricsException - If the server indicates that
an error has occurred (Possible errors - NODBDESC,
RLINKMODELNOTFOUND, EXPECTLIST, FEATURESET, PARAMVAL, INTERNAL,
NOSYSINIT)java.io.IOException - If an I/O error occursNetricsException - if there is an error retrieving the list.NetricsModelStatspublic void rldelete(java.lang.String[] modellist)
throws java.io.IOException,
NetricsException
This deletes one or more Netrics Decision Engine Models currently loaded on the Netrics server.
If any of the model names given are not on the engine a NetricsException error is thrown with a code of RLINKMODELNOTFOUND, however all other models will still be deleted.
modellist - The names of the models to be deleted.
Pass null to delete all models on the server.
NetricsException - If the server indicates that
an error has occured (Possible errors - NODBDESC,
RLINKMODELNOTFOUND, EXPECTLIST, FEATURESET, PARAMVAL, INTERNAL,
NOSYSINIT)java.io.IOException - If an I/O error occurspublic double rleval(java.lang.String rlModelName,
double[] featurevec)
throws java.io.IOException,
NetricsException
rlModelName - The name of the model to use in the evaluation.featurevec - An array of double feature values (from 0.0 to 1.0)
which will be evaluated by the model. The number of
features in this array must be the same as the model
was created and trained with.java.io.IOException - If an I/O error occursNetricsException - If the server indicates that
an error has occured (Possible errors - NORLINKMODEL, RLINKMODELNOTFOUND,
NOFEATUREVEC, NUMFEATURESMISMATCH, FEATURESET, IOERROR, PARAMVAL)@Deprecated public NetricsSearchResponse dbsearch(NetricsDbSearchCfg tblCfg, NetricsSearchOpts opts) throws java.io.IOException, NetricsException
search(NetricsSearchCfg,NetricsSearchOpts)java.io.IOExceptionNetricsExceptionpublic NetricsSearchResponse search(NetricsSearchCfg tblCfg, NetricsSearchOpts opts) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsExceptionsearch(NetricsSearchCfg[],NetricsSearchOpts)@Deprecated public NetricsSearchResponse dbsearch(NetricsDbSearchCfg[] tblCfgs, NetricsSearchOpts opts) throws java.io.IOException, NetricsException
search(NetricsSearchCfg[],NetricsSearchOpts)java.io.IOExceptionNetricsExceptionpublic NetricsSearchResponse search(NetricsSearchCfg[] tblCfgs, NetricsSearchOpts opts) throws java.io.IOException, NetricsException
Queries are set in the NetricsSearchCfg objects and overall search options are set in the NetricsSearchOpts object.
tblCfgs - One NetricsSearchCfg per table which will be searched
(can be specified in any order)opts - The configuration object for the overall search - allows
a number of options for searchingNetricsException - If the server indicates that
an error has occured (Possible errors - ARRAYLEN, TBLLOCKED,
TBLNOTFOUND, EXPECTTBLDESC, EXPECTRTBLDESC, EXPECTLIST, EXPECTQUERY,
FEATUREOFF, FEATURESET, LISTLEN, LOOKUP, NOTBLDESC, NOQUERY,
NSFIELD, NUMFIELDS, PARAMCONFLICT, PARAMMISSING, PARAMVAL, PARTIAL,
PREDTYPE, SRCHPARAM, THESNOTFOUND, UNKFIELD)java.io.IOException - If an I/O error occursNetricsSearchCfg,
NetricsSearchOptspublic NetricsSearchResponse scoreRecords(NetricsQuery query, NetricsSearchOpts query_opts, NetricsTable rec_format, NetricsRecord... records) throws java.io.IOException, NetricsException
This scores a single record, or a list of records, against a query returning a scored search result for each record given.
All records are scored and returned, even if they receive a reject score because of errors or invalid or empty data.
query - The query to run against the records. The query is
the same as for a standard search except no table
settings are required (they may be given, but are
ignored).query_opts - These are the search options for the query. They
are the same as for the standard search except those
options relating to the prefilter are ignored.rec_format - This is a table definition. It provides the
field names, field types and character maps for the
fields in the records. A full table definition may be
given, but all parts except field names, field types
and character maps are ignored.records - One or more records or an array of records. The
fields of the records must match the format defined
in the rec_layout argument.NetricsException - If the server indicates that
an error has occured (Possible errors - ARRAYLEN, TBLLOCKED,
TBLNOTFOUND, EXPECTTBLDESC, EXPECTRTBLDESC, EXPECTLIST,
EXPECTQUERY, FEATUREOFF, FEATURESET, LISTLEN, LOOKUP,
NOTBLDESC, NOQUERY, NSFIELD, NUMFIELDS, PARAMCONFLICT,
PARAMMISSING, PARAMVAL, PREDTYPE, SRCHPARAM, THESNOTFOUND,
UNKFIELD)java.io.IOException - If an I/O error occursNetricsQuery,
NetricsSearchOpts,
NetricsTablepublic NetricsSearchResponse scoreRecords(NetricsQuery query, NetricsSearchOpts query_opts, NetricsTable rec_format, NetricsRecSrc rec_src) throws java.io.IOException, NetricsException
This scores all records from a record source against a query returning a scored search result for each record given.
All records are scored and returned, even if they receive a reject score because of errors or invalid or empty data.
query - The query to run against the records. The query is
the same as for a standard search except no table
settings are required (they may be given, but are
ignored).query_opts - These are the search options for the query. They
are the same as for the standard search except those
options relating to the prefilter are ignored.rec_format - This is a table definition. It provides the
field names, field types and character maps for the
fields in the records. A full table definition may be
given, but all parts except field names, field types
and character maps are ignored.rec_src - A record source object. All records from this
object are retrieved and sent for scoring. All records
must have the format defined in the rec_layout argument.NetricsException - If the server indicates that
an error has occured (Possible errors - ARRAYLEN, TBLLOCKED,
TBLNOTFOUND, EXPECTTBLDESC, EXPECTRTBLDESC, EXPECTLIST,
EXPECTQUERY, FEATUREOFF, FEATURESET, LISTLEN, LOOKUP,
NOTBLDESC, NOQUERY, NSFIELD, NUMFIELDS, PARAMCONFLICT,
PARAMMISSING, PARAMVAL, PREDTYPE, SRCHPARAM, THESNOTFOUND,
UNKFIELD, FILEFORMAT)java.io.IOException - If an I/O error occursNetricsQuery,
NetricsSearchOpts,
NetricsTable,
NetricsRecSrc@Deprecated public NetricsDbStats[] dblist(java.lang.String[] tblnames) throws java.io.IOException, NetricsException
list(String[])java.io.IOExceptionNetricsExceptionpublic NetricsTableStats[] list(java.lang.String[] tblnames) throws java.io.IOException, NetricsException
tblnames - The names of the tables for which to receive statistics.
Pass null to recieve a NetricsTableStats object for
every table currently loaded.NetricsException - If the server indicates that
an error has occured (Possible errors - TBLNOTFOUND, EXPECTTBLDESC,
EXPECTLIST, FEATURESET, NOTBLDESC, NOSYSINIT)java.io.IOException - If an I/O error occursNetricsTableStatspublic java.lang.String[] checkpoint(java.lang.String[] tblnames)
throws java.io.IOException,
NetricsException
checkpointObjects(NetricsObjectNameCollection)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.
tblnames - The names of the tables to be checkpointed.
Pass null to checkpoint all tables currently in the server.
NetricsException - If the server indicates that
an error has occurred (Possible errors - DBPARAM, NODBDESC,
EXPECTDBDESC, DUPDBDESCS, FEATURESET, DBNOTFOUND, PARTIALCHPT,
CHPTFAILED, INTERNAL, NOSYSINIT)java.io.IOException - If an I/O error occurspublic NetricsObjectNameCollection checkpointObjects(NetricsObjectNameCollection objects) throws java.io.IOException, NetricsException
Checkpointing an object allows it 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 an object.
In order to checkpoint an object 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 objects does not exist a NetricsException is thrown with an error code of DBNOTFOUND. All objects that were found are checkpointed.
If some, but not all, of the objects fail to checkpoint for any other reason a NetricsException is thrown with error code PARTIALCHPT. Again some objects may have checkpointed successfully in this case.
If all objects 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 descriptor for each object that failed to checkpoint correctly for any reason.
If tables and/or thesauri with user-defined character maps are specified, those user-defined character maps are automatically added to the set of objects to checkpoint.
objects - The names of the objects to be checkpointed.
Pass null to checkpoint all objects currently in the server.
NetricsException - If the server indicates that
an error has occured (Possible errors - DBPARAM, NODBDESC,
EXPECTDBDESC, DUPDBDESCS, FEATURESET, DBNOTFOUND, PARTIALCHPT,
CHPTFAILED, INTERNAL, NOSYSINIT)java.io.IOException - If an I/O error occurspublic java.lang.String[] restore(java.lang.String[] tblnames)
throws java.io.IOException,
NetricsException
restoreObjects(NetricsObjectNameCollection)This restores a table to the state of the latest checkpoint for that table. The checkpoint could have been made from this invocation of the server, in which case this backs up the state of the table to that at the time of the last checkpoint, or in a previous invocation of the server, in which case this is a way to quickly reload a table.
In order to restore 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 some, but not all, of the tables fail to restore a NetricsException is thrown with error code PARTIALRESTORE.
If all tables fail to restore correctly a NetricsException is thrown with error code RESTOREFAILED.
tblnames - The names of the tables to be restored.
Pass null to restore all tables that were previously
checkpointed.
NetricsException - If the server indicates that
an error has occured (Possible errors - DBPARAM, NODBDESC,
EXPECTDBDESC, DUPDBDESCS, FEATURESET, PARTIALRESTORE,
RESTOREFAILED, INTERNAL, NOSYSINIT, SHUTDOWN)java.io.IOException - If an I/O error occurspublic NetricsObjectNameCollection restoreObjects(NetricsObjectNameCollection objects) throws java.io.IOException, NetricsException
This restores objects to the state of the latest checkpoint for those objects. The checkpoint could have been made from this invocation of the server, in which case this backs up the state of the objects to that at the time of the last checkpoint, or in a previous invocation of the server, in which case this is a way to quickly reload objects.
When user-defined character-maps are in use, it is strongly recommended that objects include all character maps.
In order to restore objects the server must have been started with checkpointing enabled. See the server user's manual for information on how to enable checkpointing.
If some, but not all, of the objects fail to restore a NetricsException is thrown with error code PARTIALRESTORE.
If all objects fail to restore correctly a NetricsException is thrown with error code RESTOREFAILED.
objects - The names of the objects to be restored.
Pass null to restore all objects that were previously
checkpointed.
NetricsException - If the server indicates that
an error has occured (Possible errors - DBPARAM, NODBDESC,
EXPECTDBDESC, DUPDBDESCS, FEATURESET, PARTIALRESTORE,
RESTOREFAILED, INTERNAL, NOSYSINIT, SHUTDOWN)java.io.IOException - If an I/O error occurspublic NetricsIdxStats[] idxlist(java.lang.String[] tblnames) throws java.io.IOException, NetricsException
tblnames - The names of the tables for which to recieve statistics.
Pass null to recieve information for indexes of all tables.
NetricsException - If the server indicates that
an error has occured (Possible errors - TBLNOTFOUND, EXPECTTBLDESC,
EXPECTLIST, FEATURESET, NOTBLDESC, NOSYSINIT)java.io.IOException - If an I/O error occursNetricsIdxStatspublic void thdelete(java.lang.String[] theslist)
throws java.io.IOException,
NetricsException
This deletes all of the thesauri given (all thesauri on the server if null passed).
theslist - The names of the thesauri to be deleted.
Pass null to delete all thesauri on the server.
NetricsException - If the server indicates that
an error has occured (Possible errors - NODBDESC, THESNOTFOUND,
EXPECTLIST, FEATURESET, PARAMVAL, INTERNAL, NOSYSINIT)java.io.IOException - If an I/O error occurspublic java.lang.String[] thlist()
throws java.io.IOException,
NetricsException
NetricsException - If the server indicates that
an error has occurred (Possible errors - THESNOTFOUND, EXPECTLIST,
PARAMVAL, NOTBLDESC, NOSYSINIT)java.io.IOException - If an I/O error occurspublic NetricsThesStats[] thes_stats(java.lang.String[] thes_names) throws java.io.IOException, NetricsException
thes_names - A list of the thesaurus names who's statistics
should be returned. If null statistics on all thesauri
is returned.NetricsException - If the server indicates that
an error has occured (Possible errors - THESNOTFOUND, EXPECTLIST, PARAMVAL, NOTBLDESC, NOSYSINIT)java.io.IOException - If an I/O error occursNetricsThesStatspublic java.lang.String[] cmaplist()
throws java.io.IOException,
NetricsException
NetricsException - If the server indicates that
an error has occured (Possible errors - CMAPNOTFOUND, EXPECTLIST, PARAMVAL, NOTBLDESC, NOSYSINIT)java.io.IOException - If an I/O error occurspublic NetricsCharmapStats[] cmap_stats(java.lang.String[] cmap_names) throws java.io.IOException, NetricsException
cmap_names - A list of the character map names who's statistics
should be returned. If null statistics on all character maps
is returned.NetricsException - If the server indicates that
an error has occured (Possible errors - CMAPNOTFOUND, EXPECTLIST, PARAMVAL, NOTBLDESC, NOSYSINIT)java.io.IOException - If an I/O error occursNetricsCharmapStats@Deprecated
public void dbmove(java.lang.String oldName,
java.lang.String newName)
throws java.io.IOException,
NetricsException
tblmove(String, String)java.io.IOExceptionNetricsExceptionpublic void tblmove(java.lang.String oldName,
java.lang.String newName)
throws java.io.IOException,
NetricsException
newName
already exists, it will be deleted, and replaced by the
table that you are renaming.
oldName - The name of the table that will be renamednewName - The new name of the tableNetricsException - If the server indicates that
an error has occured (Possible errors - TBLMOVESAME,
TBLNOTFOUND, EXPECTTBLDESC, FEATURESET, NOTBLDESC, NOSYSINIT)java.io.IOException - If an I/O error occurs@Deprecated
public void dbdelete(java.lang.String tblName)
throws java.io.IOException,
NetricsException
tbldelete(String)java.io.IOExceptionNetricsExceptionpublic void tbldelete(java.lang.String tblName)
throws java.io.IOException,
NetricsException
tblName - The name of the table to be deletedNetricsException - If the server indicates that
an error has occured (Possible errors - TBLNOTFOUND, EXPECTTBLDESC, NOTBLDESC, NOSYSINIT)java.io.IOException - If an I/O error occurs@Deprecated public NetricsDb dbdump(java.lang.String tblName, NetricsLock lock) throws java.io.IOException, NetricsException
tbldump(String,NetricsLock)java.io.IOExceptionNetricsException@Deprecated public NetricsTable tbldump(java.lang.String tblName, NetricsLock lock) throws java.io.IOException, NetricsException
recnext(NetricsTableCursor)The tables record's can be accessed through the NetricsTable's NetricsRecSrc object. The NetricsTable can be loaded into another server using the tblload command.
CAUTION! The entire contents of the table will be read into the memory space of the client. For large tables this is very likely to cause the Java Virtual Machine to run out of memory.
Note: This method will NOT delete the table.
tblName - The name of the table to dumplock - A NetricsLock object which will pass the lock key to the table. If the
table is locked with a lock key and this parameter is not passed with the matchine key,
the operation will fail.NetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND,
EXPECTTBLDESC, NOTBLDESC, PARAMVAL, SHUTDOWN)java.io.IOException - If an I/O error occurstblload(com.netrics.likeit.NetricsTable)@Deprecated public NetricsDb dbdump(java.lang.String tblName) throws java.io.IOException, NetricsException
tbldump(String)java.io.IOExceptionNetricsException@Deprecated public NetricsTable tbldump(java.lang.String tblName) throws java.io.IOException, NetricsException
recnext(NetricsTableCursor)
Version of tbldump which does not require a lock key.java.io.IOExceptionNetricsException@Deprecated public NetricsLock dblock(java.lang.String tblName, boolean searchesOnly, boolean recursive, boolean exclusive, boolean keyed, NetricsLock lock) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsException@Deprecated public NetricsLock tbllock(java.lang.String tblName, boolean searchesOnly, boolean recursive, boolean exclusive, boolean keyed, NetricsLock lock) throws java.io.IOException, NetricsException
Table locks have several optional properties which may be useful in different situations.
With no options, the tbllock command implements a simple toggle lock. Attempts to set or unset the lock always succeed, provided that no other types of locks are in use. A toggle lock only has two states, locked or unlocked. If you were to set the lock twice, and then unset it once, the table would be unlocked.
In contrast, a recursive lock is a counting lock. When locked with a recursive lock, the table will not become unlocked until the number of unlock operations match the number of lock operations. This kind of lock can be useful in environments with updates coming from multiple independent sources. Client A can set a recursive lock, and begin adding new records. Client B can also set a recursive lock and begin adding records. The table will not become unlocked until both clients A and B have released their locks. To create a recursive lock, pass the recursive parameter a value of true.
An exclusive lock is another type of lock which may be useful when updates are coming from multiple sources. Unlike a recursive lock, attempts to lock a locked table with an exclusive lock will return with an error. When using exclusive locks, client A may set an exclusive lock and begin adding new records. When client B attempts to acquire a lock, it will fail and need to wait and try again when client A has released the lock. To create an exclusive lock, pass the exclusive parameter a value of true.
Table locks may also be keyed. When the keyed parameter is set to true, a keyed lock will be created. It will be returned to the caller in the NetricsLock object. The use of the key in any NetricsServerInterface method will allow that method to succeed, even though the table is locked. When a keyed lock is used, the key must be used to unlock the table. Unlike an unkeyed lock, a keyed lock is allowed to be both recursive and exclusive.
Lock types may not be mixed on a single table at a single time. Attempts to acquire a lock on a locked table with differing locking options will always fail. Any locking options used in a lock command must also be used in a corresponding unlock command to ensure that the unlock operation matches the lock operation.
tblName - The name of the table to locksearchesOnly - If this parameter is true, the lock blocks only
searches, and all updates may proceed unaffected by the lock.recursive - If this parameter is true, the lock is a counting lock.exclusive - If this parameter is true, the lock will fail on a
locked table unless the lock is also recursive and keyed.keyed - If this parameter is true, a key will be generated which
can be used to perform operations on tables even though
they are locked.lock - A NetricsLock object which will pass the lock key to the
table. If the table is locked with a lock key and this
parameter is not passed with the matchine key,
the operation will fail.NetricsException - If the server indicates that
an error has occured (Possible errors - EXPECTTBLDESC, NOTBLDESC,
TBLNOTFOUND, TBLLOCKED, TBLUNLOCKED, PARAMVAL)java.io.IOException - If an I/O error occurstblunlock(java.lang.String, boolean, boolean, boolean, boolean, com.netrics.likeit.NetricsLock)@Deprecated public NetricsLock dblock(java.lang.String tblName, boolean searchesOnly, boolean recursive, boolean exclusive, boolean keyed) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsException@Deprecated public NetricsLock tbllock(java.lang.String tblName, boolean searchesOnly, boolean recursive, boolean exclusive, boolean keyed) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsException@Deprecated
public void dblock(java.lang.String tblName)
throws java.io.IOException,
NetricsException
java.io.IOExceptionNetricsException@Deprecated
public void tbllock(java.lang.String tblName)
throws java.io.IOException,
NetricsException
java.io.IOExceptionNetricsException@Deprecated
public void dbunlock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed,
NetricsLock lock)
throws java.io.IOException,
NetricsException
java.io.IOExceptionNetricsException@Deprecated
public void tblunlock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed,
NetricsLock lock)
throws java.io.IOException,
NetricsException
NetricsException - If the server indicates that
an error has occured (Possible errors - same as tbllock)java.io.IOException - If an I/O error occurstbllock(java.lang.String, boolean, boolean, boolean, boolean, com.netrics.likeit.NetricsLock)@Deprecated
public void dbunlock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed)
throws java.io.IOException,
NetricsException
java.io.IOExceptionNetricsException@Deprecated
public void tblunlock(java.lang.String tblName,
boolean searchesOnly,
boolean recursive,
boolean exclusive,
boolean keyed)
throws java.io.IOException,
NetricsException
java.io.IOExceptionNetricsException@Deprecated
public void dbunlock(java.lang.String tblName)
throws java.io.IOException,
NetricsException
java.io.IOExceptionNetricsException@Deprecated
public void tblunlock(java.lang.String tblName)
throws java.io.IOException,
NetricsException
java.io.IOExceptionNetricsException@Deprecated public NetricsRecord[] dbrecget(java.lang.String tblName, java.lang.String[] recKeys, NetricsLock lock) throws java.io.IOException, NetricsException
recget(String,String[],NetricsLock)java.io.IOExceptionNetricsExceptionpublic NetricsRecord[] recget(java.lang.String tblName, java.lang.String[] recKeys, NetricsLock lock) throws java.io.IOException, NetricsException
This method should typically be used instead of performing multiple single record "gets" for performance reasons.
tblName - The name of the table to get the records fromrecKeys - The record keys of the records to getlock - A NetricsLock object which will pass the lock key to
the table. If the table is locked with a lock key and
this parameter is not passed with the matchine key,
the operation will fail.NetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED,
TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST,
EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM)java.io.IOException - If an I/O error occursjava.lang.IllegalArgumentException - If recKeys is null or zero length.NetricsRecord@Deprecated public NetricsRecord[] dbrecget(java.lang.String tblName, java.lang.String[] recKeys) throws java.io.IOException, NetricsException
recget(String,String[])java.io.IOExceptionNetricsExceptionpublic NetricsRecord[] recget(java.lang.String tblName, java.lang.String[] recKeys) throws java.io.IOException, NetricsException
This method should typically be used instead of performing multiple single record "gets" for performance reasons.
tblName - The name of the table to get the records fromrecKeys - The record keys of the records to getNetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND,
DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY,
NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM)java.io.IOException - If an I/O error occursNetricsRecord@Deprecated public NetricsRecord dbrecget(java.lang.String tblName, java.lang.String recKey) throws java.io.IOException, NetricsException
recget(String,String)java.io.IOExceptionNetricsExceptionpublic NetricsRecord recget(java.lang.String tblName, java.lang.String recKey) throws java.io.IOException, NetricsException
tblName - a table name.recKey - The record key of the recordNetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occursNetricsTableStatspublic NetricsRecord getChildRecord(java.lang.String table_name, java.lang.String parent_key, java.lang.String child_key) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsExceptiongetChildRecords(String,String[],String[])public NetricsRecord[] getChildRecords(java.lang.String table_name, java.lang.String[] parent_keys, java.lang.String[] child_keys) throws java.io.IOException, NetricsException
This method should typically be used instead of performing multiple single record "gets" for performance reasons.
table_name - The name of the child table
to get the records from.parent_keys - The parent record keys of the records to get.child_keys - The child record keys of the records to get.
If null is passed in then all child records
with the given parent record keys are returned.NetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND,
DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC,
NORECKEY, RECNOTFOUND, UPDPARAM, ARRAYLEN)java.io.IOException - If an I/O error occursNetricsRecordpublic NetricsRecord[] getChildRecords(java.lang.String table_name, NetricsRecord.ChildType child_type, java.lang.String[] parent_keys, java.lang.String[] child_keys) throws java.io.IOException, NetricsException
This method should typically be used instead of performing multiple single record "gets" for performance reasons.
This method adds the ability to specify the type of child records to be returned: ORPHANS, NONORPHANS or all types.
table_name - The name of the child table to get the records fromchild_type - The type of child records to return. One of
ORPHANS, NONORPHANS or ALL.parent_keys - The parent record keys of the records to getchild_keys - The child record keys of the records to get.
If null is passed in then all child records
with the given parent record keys are returned.NetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND,
DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC,
NORECKEY, RECNOTFOUND, UPDPARAM, ARRAYLEN)java.io.IOException - If an I/O error occursNetricsRecordpublic NetricsRecord[] getChildRecords(java.lang.String table_name, NetricsRecord.ChildType child_type, java.lang.String[] parent_keys, java.lang.String[] child_keys, boolean do_max_work) throws java.io.IOException, NetricsException
This method should typically be used instead of performing multiple single record "gets" for performance reasons.
This method adds the ability to specify the type of child records to be returned: ORPHANS, NONORPHANS or all types.
table_name - The name of the child table to get the records fromchild_type - The type of child records to return. One of
ORPHANS, NONORPHANS or ALL.parent_keys - The parent record keys of the records to getchild_keys - The child record keys of the records to get.
If null is passed in then all child records
with the given parent record keys are returned.do_max_work - If true record not found errors are ignored.NetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND,
DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC,
NORECKEY, RECNOTFOUND, UPDPARAM, ARRAYLEN)java.io.IOException - If an I/O error occursNetricsRecordpublic NetricsTableStats delChildRecord(java.lang.String table_name, java.lang.String parent_key, java.lang.String child_key, boolean doMaxWork) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsExceptiondelChildRecords(java.lang.String, java.lang.String[], java.lang.String[], boolean)public NetricsTableStats delChildRecords(java.lang.String table_name, java.lang.String[] parent_keys, java.lang.String[] child_keys, boolean doMaxWork) throws java.io.IOException, NetricsException
table_name - The name of the child table from which the records
will be deletedparent_keys - The parent record keys of the records to deletechild_keys - The child record keys of the records to delete.
If null is passed in then all child records
with the given parent record keys are deleted.doMaxWork - Continue on error - deletes those records which do existNetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND,
DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC,
NORECKEY, RECNOTFOUND, UPDPARAM)java.io.IOException - If an I/O error occursNetricsTableStatspublic NetricsTableStats delChildRecords(java.lang.String table_name, NetricsRecord.ChildType child_type, java.lang.String[] parent_keys, java.lang.String[] child_keys, boolean doMaxWork) throws java.io.IOException, NetricsException
table_name - The name of the child table from which the records
will be deletedchild_type - The type of child records to delete. One of
ORPHANS, NONORPHANS or ALL.parent_keys - The parent record keys of the records to deletechild_keys - The child record keys of the records to delete.
If null is passed in then all child records
with the given parent record keys are deleted.doMaxWork - Continue on error - deletes those records which
do existNetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND,
DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC,
NORECKEY, RECNOTFOUND, UPDPARAM)java.io.IOException - If an I/O error occursNetricsTableStatspublic NetricsCompoundRecord[] getCompoundRecords(java.lang.String parent_table, java.lang.String[] child_tables, java.lang.String... parent_keys) throws java.io.IOException, NetricsException, java.lang.IllegalArgumentException
This method is used to retrieve compound records. A compound record consists of a parent record and all child records linked to that parent record. The records are fetched based on a list of the keys of the parent records. A list of the child tables to be included can be specified, by default all child tables of the parent table are included.
parent_table - The name of the parent table. The table listed
must exist in the Patterns server and have a table
type of parent.child_tables - A list of the names of the child tables to
be included in the compound record. All tables
listed must be a child table of the given parent table.
Duplicate names are not allowed. The order of listing
is irrelevant. If this is null all child tables
of the given parent table are included.parent_keys - The parent record keys of the records to getNetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND,
DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECKEY, NOTBLDESC,
NORECKEY, RECNOTFOUND, UPDPARAM, ARRAYLEN)java.io.IOException - If an I/O error occursjava.lang.IllegalArgumentException - if parent_table is not a parent
table, or if any child table is not a child of
parent_table, or if a duplicate name exists in
the child_tables list.NetricsCompoundRecord@Deprecated public NetricsDbStats dbrecadd(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork, NetricsLock lock) throws java.io.IOException, NetricsException
recadd(String,NetricsRecSrc,boolean,NetricsLock,int)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats recadd(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork, NetricsLock lock, int estNumRecs) throws java.io.IOException, NetricsException
tblName - The name of the table to which the records will be added.src - The record source for those records which will be added.doMaxWork - Continue on error - adds those records which do not
already exist.lock - A NetricsLock object which will pass the lock key to
the table. If the table is locked with a lock key and
this parameter is not passed with the matchine key,
the operation will fail.estNumRecs - The estimated number of records in the record
source. This is used by the server to determine
the most efficient loading method. It need not
be exact or even close.NetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND,
EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FIELDLENSUM, NOTBLDESC,
NORECKEY, NOSRCHTXT, NUMFIELDS, RECEXISTS, UPDPARAM, SHUTDOWN)java.io.IOException - If an I/O error occursNetricsTableStats@Deprecated public NetricsDbStats dbrecadd(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork) throws java.io.IOException, NetricsException
recadd(String,NetricsRecSrc,boolean)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats recadd(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork, NetricsLock lock) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsExceptionrecadd(String, NetricsRecSrc, boolean, NetricsLock, int)public NetricsTableStats recadd(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork, int estNumRecs) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsExceptionrecadd(String, NetricsRecSrc, boolean, NetricsLock, int)public NetricsTableStats recadd(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsExceptionrecadd(String, NetricsRecSrc, boolean, NetricsLock, int)@Deprecated public NetricsDbStats dbrecadd(java.lang.String tblName, NetricsRecord rec) throws java.io.IOException, NetricsException
recadd(String,NetricsRecord)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats recadd(java.lang.String tblName, NetricsRecord rec) throws java.io.IOException, NetricsException
tblName - The name of the table that the record
will be added torec - The record which will be addedNetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occursNetricsTableStats@Deprecated public NetricsDbStats dbrecdelete(java.lang.String tblName, java.lang.String[] recKeys, boolean doMaxWork, NetricsLock lock) throws java.io.IOException, NetricsException
recdelete(String,String[],boolean,NetricsLock)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats recdelete(java.lang.String tblName, java.lang.String[] recKeys, boolean doMaxWork, NetricsLock lock) throws java.io.IOException, NetricsException
tblName - The name of the table from which the records will be
deletedrecKeys - The record keys of the records to be deleteddoMaxWork - Continue on error - deletes those records which do existlock - A NetricsLock object which will pass the lock key to the
table. If the table is locked with a lock key and this
parameter is not passed with the matchine key, the
operation will fail.NetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED,
TBLNOTFOUND, DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST,
EXPECTRECKEY, NOTBLDESC, NORECKEY, RECNOTFOUND, UPDPARAM)java.io.IOException - If an I/O error occursNetricsTableStats@Deprecated public NetricsDbStats dbrecdelete(java.lang.String tblName, java.lang.String[] recKeys, boolean doMaxWork) throws java.io.IOException, NetricsException
recdelete(String,String[],boolean)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats recdelete(java.lang.String tblName, java.lang.String[] recKeys, boolean doMaxWork) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsExceptionrecdelete(String, String[], boolean, NetricsLock)@Deprecated public NetricsDbStats dbrecdelete(java.lang.String tblName, java.lang.String recKey) throws java.io.IOException, NetricsException
recdelete(String,String)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats recdelete(java.lang.String tblName, java.lang.String recKey) throws java.io.IOException, NetricsException
tblName - The name of the table from which the record will be
deletedrecKey - The record key of the record to be deletedNetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occursNetricsTableStatspublic NetricsTableStats[] delCompoundRecords(java.lang.String parent_table, java.lang.String[] child_tables, java.lang.String[] parent_keys, boolean delete_orphans, boolean doMaxWork) throws java.io.IOException, NetricsException, java.lang.IllegalArgumentException
parent_table - The name of the parent table. The table must exist
in the Patterns server and have a table type of parent.child_tables - A list of names of child tables. Only child records
from these tables are deleted. All tables listed must be children
of parent_table. Duplicate names are not allowed. If this
is null all child tables of the given parent table are included.parent_keys - Keys of parent records to be deleted.delete_orphans - If true, all child records whose parent-reference
matches one of the keys in parent_keys will be deleted,
regardless of orphan status. parent_keys will be deleted.doMaxWork - Ignore record-not-found errors when deleting from the
parent table.NetricsException - If the server indicates an error occured.java.io.IOException - If an I/O error occursjava.lang.IllegalArgumentException - if parent_table is not a parent
table, or if any child table is not a child of parent_table, or if
a duplicate name exists in the child_tables list, or if parent_keys
is null, or if parent_table is null, or if a child table name is null.NetricsCompoundRecord@Deprecated public NetricsDbStats dbrecreplace(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork, NetricsLock lock) throws java.io.IOException, NetricsException
recreplace(String,NetricsRecSrc,boolean,NetricsLock)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats recreplace(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork, NetricsLock lock) throws java.io.IOException, NetricsException
tblName - The name of the table containing the records
being replacedsrc - The record source for those records which will be replaceddoMaxWork - Continue on error - replaces those records which do
existlock - A NetricsLock object which will pass the lock key to the
table. If the table is locked with a lock key and this
parameter is not passed with the matchine key, the
operation will fail.NetricsException - If the server indicates that
an error has occured (Possilbe errors - TBLLOCKED, TBLNOTFOUND,
DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FIELDLENSUM,
NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS, RECNOTFOUND, UPDPARAM, SHUTDOWN)java.io.IOException - If an I/O error occursNetricsTableStats@Deprecated public NetricsDbStats dbrecreplace(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork) throws java.io.IOException, NetricsException
recreplace(String,NetricsRecSrc,boolean)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats recreplace(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsExceptionrecreplace(String, NetricsRecSrc, boolean, NetricsLock)@Deprecated public NetricsDbStats dbrecreplace(java.lang.String tblName, NetricsRecord rec) throws java.io.IOException, NetricsException
recreplace(String,NetricsRecord)java.io.IOExceptionNetricsExceptionpublic NetricsTableStats recreplace(java.lang.String tblName, NetricsRecord rec) throws java.io.IOException, NetricsException
tblName - The name of the table containing the record
being replacedrec - The new record. The value of its record key should be
the record key of the record being replaced.NetricsException - If the server indicates that
an error has occured.java.io.IOException - If an I/O error occurs.NetricsTableStatspublic NetricsTableStats recupdate(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork, NetricsLock lock) throws java.io.IOException, NetricsException
Update operations add the record if it does not exist and replace the record if it does.
tblName - The name of the table containing the records
being updatedsrc - The record source for those records which will be updateddoMaxWork - Continue on error - update as man records as
possible, ignoring records with errors.lock - A NetricsLock object which will pass the lock key to
the table. If the table is locked with a lock key and
this parameter is not passed with the matchine key,
the operation will fail.NetricsException - If the server indicates that
an error has occured (possible errors - TBLLOCKED, TBLNOTFOUND,
DUPRECKEYS, EXPECTTBLDESC, EXPECTLIST, EXPECTRECORD, FIELDLENSUM,
NOTBLDESC, NORECKEY, NOSRCHTXT, NUMFIELDS, RECNOTFOUND, UPDPARAM,
SHUTDOWN)java.io.IOException - If an I/O error occursNetricsTableStatspublic NetricsTableStats recupdate(java.lang.String tblName, NetricsRecSrc src, boolean doMaxWork) throws java.io.IOException, NetricsException
java.io.IOExceptionNetricsExceptionrecupdate(String, NetricsRecSrc, boolean, NetricsLock)public NetricsTableStats recupdate(java.lang.String tblName, NetricsRecord rec) throws java.io.IOException, NetricsException
tblName - The name of the table containing the record
being updated.rec - The new version of the record.NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occursNetricsTableStatspublic NetricsTableStats doRecOps(java.lang.String table_name, boolean do_max_work, NetricsRecOpSrc rec_ops) throws java.io.IOException, NetricsException, NetricsRecSrcException, java.lang.IllegalArgumentException
table_name - the name of the TIBCO Patterns table holding
the records.do_max_work - If true record key and record format errors are
quietly ignored.rec_ops - The source that provides the stream of record operations.java.io.IOException - on communications errors with the TIBCO Patterns
server.NetricsException - on errors returned by the TIBCO Patterns server.NetricsRecSrcException - on errors retrieving the record
operations.java.lang.IllegalArgumentException - if rec_ops is null.public NetricsTableStats doRecOps(java.lang.String table_name, boolean do_max_work, NetricsRecOp... rec_ops) throws java.io.IOException, NetricsException, NetricsRecSrcException, java.lang.IllegalArgumentException
table_name - the name of the TIBCO Patterns table holding
the records.do_max_work - If true record key and record format errors are
quietly ignored.rec_ops - An array or list of record operations.java.io.IOException - on communications errors with the TIBCO Patterns
server.NetricsException - on errors returned by the TIBCO Patterns server.NetricsRecSrcException - on errors retrieving the record
operations.java.lang.IllegalArgumentException - if rec_ops is null.public NetricsCmdStats[] cmdstats(java.lang.String[] cmd_names) throws java.io.IOException, NetricsException
This reports statistics for the named commands. A command name of NetricsCmdStats.CMD_ALL can be used to retrieve statistics for all commands. This command will generate a report that includes all commands completed from the time the server was started until the time the request was received.
cmd_names - The names of the commands to be included in the
report. The class NetricsCmdStats has defines of all command names.NetricsException - If the server indicates that an error
has occured (Possible errors - PARAMVAL, EXPECTLIST, INTERNAL)java.io.IOException - If an I/O error occursNetricsCmdStatspublic NetricsCmdStats[] cmdstats(java.lang.String[] cmd_names, double duration) throws java.io.IOException, NetricsException
This reports statistics for the named commands starting from the present moment going duration seconds into the past. A command name of NetricsCmdStats.CMD_ALL can be used to retrieve statistics for all commands.
The duration value is approximate. Each time a report request is made that does not request a specific end_time a reporting tic-mark is made at that time. The start and end time for a report will be reset to the closest time tic-mark set by a previous report. (This implies the first report always includes the entire time span since the start of the server.) The normal procedure is to request reports at a fixed interval requesting durations in units of the request interval. E.g. request a report every 5 minutes covering a 15 minute period.
cmd_names - The names of the commands to be included in the
report. The class NetricsCmdStats has defines of all command names.duration - The time period in seconds to be covered by this
report.NetricsException - If the server indicates that an error
has occured (Possible errors - PARAMVAL, PARAMCONFLICT,
EXPECTLIST, INTERNAL)java.io.IOException - If an I/O error occursNetricsCmdStatspublic NetricsCmdStats[] cmdstats(java.lang.String[] cmd_names, double duration, double end_time) throws java.io.IOException, NetricsException
This reports statistics for the named commands ending at the given time going duration seconds into the past from that time. A command name of NetricsCmdStats.CMD_ALL can be used to retrieve statistics for all commands.
The end time and duration are approximate. Each time a report request is made that does not request a specific end time a reporting tic-mark is made at that time. The start and end time for a report will be reset to the closest time tic-mark set by a previous report. (This implies the first report always includes the entire time span since the start of the server.) The normal procedure is to request reports at a fixed interval requesting durations in units of the request interval. E.g. request a report every 5 minutes covering a 15 minute period.
The end_time value is given in milliseconds from an arbitrary
epic point, thus the only valid way to get an end_time value is
to use a value returned by a previous report. So if you are
requesting reports every 5 minutes and you want reports that cover
the previous 5, 10, 15 minutes and the entire server time span
the normal procedure would be something like:
String [] cmd_list = new { NetricsCmdStats.CMD_ALL };
NetricsCmdStats []report_5 ;
NetricsCmdStats []report_10 ;
NetricsCmdStats []report_15 ;
NetricsCmdStats []report_forever ;
report_5 = si.cmdstats(cmd_list,60.0*5.0);
double end_time = report_5[0].end_time();
report_10 = si.cmdstats(cmd_list,60.0*10.0,end_time);
report_15 = si.cmdstats(cmd_list,60.0*15.0,end_time);
report_forever = si.cmdstats(cmd_list,-1.0,end_time);
cmd_names - The names of the commands to be included in the
report. The class NetricsCmdStats has defines of all command names.duration - The time period in seconds to be covered by this
report. -1.0 can be used to indicate "forever".end_time - The ending time for a report.NetricsException - If the server indicates that an error
has occured (Possible errors - PARAMVAL, PARAMCONFLICT,
EXPECTLIST, INTERNAL)java.io.IOException - If an I/O error occursNetricsCmdStatspublic void cmdstats_reset(java.lang.String[] cmd_names,
double start_time)
throws java.io.IOException,
NetricsException
This resets the processing statistics, removing any collected statistics for commands completed before start_time (the present moment if < 0.0). A command name of NetricsCmdStats.CMD_ALL can be used to retrieve statistics for all commands.
The start_time value is given in milliseconds from an arbitrary epic point, thus the only valid way to get a start_time value is to use a value returned by a previous report. As with end_time the start time is approximate and matches the start time of previously tic-marked reports.
cmd_names - The names of the commands to be included in the
report. The class NetricsCmdStats has defines of all command names.start_time - Data for commands before this point is deleted.NetricsException - If the server indicates that an error
has occured (Possible errors - PARAMVAL, PARAMCONFLICT,
EXPECTLIST, INTERNAL)java.io.IOException - If an I/O error occurspublic void svrlogon()
throws java.io.IOException,
NetricsException
NetricsException - If the server indicates that
an error has occured (Possible errors - LOGFILE, IPCERR, IPCTIMEOUT, IPCEOF, HANDSHAKE)java.io.IOException - If an I/O error occurspublic void svrlogoff()
throws java.io.IOException,
NetricsException
NetricsException - If the server indicates that
an error has occured (Possible errors - EXPECTRTBLDESC, IPCERR, IPCTIMEOUT, IPCEOF, HANDSHAKE)java.io.IOException - If an I/O error occurspublic NetricsServerStats server_info() throws java.io.IOException, NetricsException
NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occursNetricsServerStatspublic java.lang.String svrversion()
throws java.io.IOException,
NetricsException
NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occursserver_info(),
NetricsServerStatspublic boolean isDecisionEngine()
throws java.io.IOException,
NetricsException
This returns true if the server indicates it supports Decision Models. Note that older versions of the server do not send back this information, so this method will return false for servers before release 4.3.1 even if they do support the Decision Model.
NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic boolean isGIPEnabled()
throws java.io.IOException,
NetricsException
This returns true if the server indicates tables creation uses the GIP prefilter by default. Note that older versions of the server do not send back this information, so this method will return false for servers before release 4.3.1 even if they do support the GIP prefilter.
NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic boolean isSortEnabled()
throws java.io.IOException,
NetricsException
This returns true if the server indicates tables creation uses the SORT prefilter by default. Note that older versions of the server do not send back this information, so this method will return false for servers before release 4.3.1 even if they do support the Sort prefilter.
NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic boolean isPsiEnabled()
throws java.io.IOException,
NetricsException
This returns true if the server indicates tables creation uses the PSI prefilter by default. Note that older versions of the server do not send back this information, so this method will return false for servers before PSI was released.
NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic java.lang.String version()
public void svrshutdown()
throws java.io.IOException,
NetricsException
NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic void loadClusterConfiguration(java.lang.String file_name)
throws java.io.IOException,
NetricsException
file_name - The name of the new file. This file and path
must be recognizable within the context of the cluster gateway.NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic void svrnoop()
throws java.io.IOException,
NetricsException
This method is the quickest way to determine if the Netrics server is responding or not.
NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic NetricsTranStats[] listTransactions(int idle_cutoff) throws NetricsException, java.io.IOException
idle_cutoff - an idle time cutoff, in secondsNetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic void tranAbort(int tran_id)
throws java.io.IOException,
NetricsException
tran_id - id of the transaction to abortNetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic void tranCommit(int tran_id)
throws java.io.IOException,
NetricsException
tran_id - id of the transaction to commitNetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic void tranForceCommit(int tran_id)
throws java.io.IOException,
NetricsException
tran_id - id of the transaction to forcefully commit.NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic void tranSetIdleOpts(int idle_time,
java.lang.String action)
throws java.io.IOException,
NetricsException
A transaction is idle when no commands are being run under that transaction. The idle time is the time from the completion of the last command associated with the transaction to the present time.
The purpose of idle transaction clean up is to take care of transactions that were abandoned, e.g. an application crashed in the middle of the transaction and thus will never close it. These parameters can be set from command line arguments when the server is started, so generally it is not necessary to do so from the API.
The server doesn't guarantee that a transaction will be cleaned up as soon as it exceeds the idle time. Checks are made on a periodic basis, so transactions may be idle for some seconds past the maximum before they are detected.
idle_time - This defines how many seconds a transaction must
sit idle before the clean up action is performed. If this
value is zero the max idle time is considered to be infinite
(i.e. no clean up is performed). If this value is less than
zero the max idle time parameter is left unchanged.action - This defines the action to be performed on
all transactions that exceed the maximum idle time. It is a
one character flag with values: a abort the transaction,
c commit the transaction, e abort the
transaction if it has errors, otherwise commit the transaction,
n do nothing. If this argument is null, an
empty string or a single blank character the parameter is
left unchanged.NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic NetricsRecord[] recnext(NetricsTableCursor cursor) throws java.io.IOException, NetricsException
Returns an array of records representing the next batch of records from the cursor. If the cursor is at EOT null is returned. The number of records returned could be less than the batch size if this is the last batch.
cursor - The cursor to fetch from.NetricsException - If the server indicates that
an error has occuredjava.io.IOException - If an I/O error occurspublic NetricsCompoundRecord[] compoundNext(NetricsTableCursor cursor) throws java.io.IOException, NetricsException, java.lang.IllegalArgumentException
This method is used to retrieve compound records from a table cursor. A compound record consists of a parent record and all child records linked to that parent record. The cursor scans the parent table, and fetches all child records of the parent records returned to produce the compound records returned.
cursor - The cursor being used to scan the table.NetricsException - If the server indicates that
an error has occured (Possible errors - TBLLOCKED, TBLNOTFOUND)java.io.IOException - If an I/O error occursjava.lang.IllegalArgumentException - if parent_table is not a parent
table, of if any child table is not a child of
parent_table, or if a duplicate name exists in
the child_tables list.NetricsCompoundRecord,
NetricsTableCursorpublic void setNetProtocols(int protocols)
protocols - Which protocols to use. One of
NetricsConMgr.PROTOCOL_DEFAULT,
NetricsConMgr.PROTOCOL_IPV4_ONLY,
NetricsConMgr.PROTOCOL_IPV6_ONLY, or
NetricsConMgr.PROTOCOL_MIXED.public java.util.Locale setServerLocale(java.util.Locale locale)
locale - the local to use, null resets to the default locale.