C++ counterparts of SPL native functions that provide general utilities. More...
Functions |
|
void | abort (const std::string &file, uint32_t line) |
a unique name generation for parameters and files. |
|
SPL::boolean | isTraceable (const Enum &traceLevel) |
void | appTrc (const Enum &traceLevel, const std::string &message, const std::string &aspect, const std::string &file, uint32_t line) |
void | appTrc (const Enum &traceLevel, const SPL::ustring &message, const SPL::ustring &aspect, const std::string &file, uint32_t line) |
void | appTrc (const Enum &traceLevel, const SPL::BString &message, const SPL::BString &aspect, const std::string &file, uint32_t line) |
void | appTrc (const Enum &traceLevel, const SPL::rstring &message, const std::string &file, uint32_t line) |
void | appTrc (const Enum &traceLevel, const SPL::ustring &message, const std::string &file, uint32_t line) |
SPL::boolean | isLoggable (const Enum &logLevel) |
void | appLog (const Enum &logLevel, const std::string &message, const std::string &aspect, const std::string &file, uint32_t line) |
void | appLog (const Enum &logLevel, const SPL::ustring &message, const SPL::ustring &aspect, const std::string &file, uint32_t line) |
void | appLog (const Enum &logLevel, const SPL::BString &message, const SPL::BString &aspect, const std::string &file, uint32_t line) |
void | appLog (const Enum &logLevel, const SPL::rstring &message, const std::string &file, uint32_t line) |
void | appLog (const Enum &logLevel, const SPL::ustring &message, const std::string &file, uint32_t line) |
void | log (const Enum &logLevel, const std::string &message, const std::string &aspect, const std::string &file, uint32_t line) |
void | log (const Enum &logLevel, const SPL::ustring &message, const SPL::ustring &aspect, const std::string &file, uint32_t line) |
void | log (const Enum &logLevel, const SPL::BString &message, const SPL::BString &aspect, const std::string &file, uint32_t line) |
void | log (const Enum &logLevel, const SPL::rstring &message, const std::string &file, uint32_t line) |
void | log (const Enum &logLevel, const SPL::ustring &message, const std::string &file, uint32_t line) |
void | shutdownPE () |
Shutdown the current processing element (PE). |
|
SPL::boolean | isShutdown () |
void | block (double const time) |
SPL::int32 | getChannel () |
SPL::int32 | getMaxChannels () |
SPL::rstring | getThisOperatorName () |
SPL::rstring | getThisOperatorLogicalName () |
SPL::rstring | getEnvironmentVariable (SPL::rstring const &name) |
SPL::rstring | getEnvironmentVariable (SPL::rstring const &name, SPL::rstring const &defaultValue) |
SPL::rstring | getEnvironmentVariable (SPL::rstring const &name, SPL::boolean &isSet) |
void | getInputPortMetricValue (SPL::uint32 port, int name, SPL::int64 &value) |
void | getInputPortMetricValue (SPL::uint32 port, const SPL::Enum &name, SPL::int64 &value) |
void | getOutputPortMetricValue (SPL::uint32 port, int name, SPL::int64 &value) |
void | getOutputPortMetricValue (SPL::uint32 port, const SPL::Enum &name, SPL::int64 &value) |
void | getCustomMetricValue (SPL::rstring const &name, SPL::int64 &value) |
void | getCustomMetricValue (SPL::ustring const &name, SPL::int64 &value) |
void | setCustomMetricValue (SPL::rstring const &name, SPL::int64 value) |
void | setCustomMetricValue (SPL::ustring const &name, SPL::int64 value) |
void | createCustomMetric (SPL::rstring const &name, SPL::rstring const &description, const Enum &kind, SPL::int64 value) |
void | createCustomMetric (SPL::ustring const &name, SPL::ustring const &description, const Enum &kind, SPL::int64 value) |
bool | hasCustomMetric (SPL::rstring const &name) |
bool | hasCustomMetric (SPL::ustring const &name) |
SPL::list< SPL::rstring > | getCustomMetricNames () |
SPL::rstring | formatNumber (const SPL::int64 value) |
SPL::rstring | formatNumber (const SPL::int64 value, SPL::uint32 width) |
SPL::rstring | formatNumber (const SPL::float64 value) |
SPL::rstring | formatNumber (const SPL::float64 value, SPL::uint32 width, SPL::uint32 precision, bool scientific) |
SPL::int32 | parseNumber (SPL::int64 &number, SPL::rstring const &text, SPL::int32 base) |
SPL::int32 | parseNumber (SPL::int64 &number, SPL::rstring const &text) |
SPL::int32 | parseNumber (SPL::int64 &number, SPL::ustring const &text) |
SPL::int32 | parseNumber (SPL::float64 &number, SPL::rstring const &text) |
SPL::int32 | parseNumber (SPL::float64 &number, SPL::ustring const &text) |
SPL::rstring | strerror (const SPL::int32 errnum) |
SPL::uint64 | strtoull (const SPL::rstring &value, SPL::int32 base) |
SPL::uint64 | strtoull (const SPL::rstring &value, SPL::int32 base, SPL::int32 &numCharsProcessed) |
SPL::int64 | strtoll (const SPL::rstring &value, SPL::int32 base) |
SPL::int64 | strtoll (const SPL::rstring &value, SPL::int32 base, SPL::int32 &numCharsProcessed) |
SPL::float64 | strtod (const SPL::rstring &value) |
SPL::float64 | strtod (const SPL::rstring &value, SPL::int32 &numCharsProcessed) |
template<class T > | |
void | print (const T &t) |
void | printStringLn (const SPL::rstring &s) |
void | printStringLn (const SPL::BString &s) |
void | printStringLn (const SPL::ustring &s) |
void | printString (const SPL::rstring &s) |
void | printString (const SPL::BString &s) |
void | printString (const SPL::ustring &s) |
template<class T > | |
void | println (const T &t) |
void | flushStdio () |
void | assignFrom (SPL::Tuple &lhs, SPL::Tuple const &rhs) |
template<class T > | |
SPL::uint64 | hashCode (const T &v) |
template<class T > | |
SPL::list< SPL::uint64 > | hashCodeForEach (const SPL::list< T > &l) |
template<class T , int32_t N> | |
SPL::list< SPL::uint64 > | hashCodeForEach (const SPL::blist< T, N > &l) |
SPL::rstring | dataDirectory () |
Miscellaneous. |
|
template<class T > | |
void | swap (T &s1, T &s2) |
SPL::rstring | mktemp (const SPL::rstring &templat) |
SPL::uint64 | jobID () |
SPL::rstring | getJobName () |
SPL::rstring | getJobGroup () |
SPL::rstring | getApplicationName () |
SPL::uint64 | PEID () |
SPL::rstring | instanceID () |
SPL::rstring | domainID () |
SPL::uint32 | getRelaunchCount () |
SPL::boolean | isControlInputPort (uint32 port) |
SPL::boolean | isConsistentInputPort (uint32 port) |
SPL::boolean | isInConsistentRegion () |
SPL::boolean | isStartOfConsistentRegion () |
SPL::boolean | isEndOfConsistentRegion () |
SPL::boolean | isTriggerOfConsistentRegion () |
SPL::int32 | getConsistentRegionIndex () |
SPL::int64 | getSequenceId () |
SPL::float64 | getDrainTimeout () |
SPL::float64 | getResetTimeout () |
SPL::int32 | getResetAttempt () |
void | resetConsistentRegion () |
SPL::boolean | evalPredicate (const SPL::rstring &splExpr, const Tuple &tuple, SPL::int32 &error) |
SPL::rstring | getHostName () |
SPL::rstring | getShortHostName () |
SPL::rstring | getConfiguredHostName () |
SPL::rstring | getIPAddress () |
SPL::int32 | getOutputPortExportProperties (List &properties, uint32 port) |
SPL::int32 | setOutputPortExportProperties (const List &properties, uint32 port) |
SPL::int32 | setOutputPortExportProperties (const Tuple &properties, uint32 port) |
SPL::rstring | getInputPortImportSubscription (uint32 port, SPL::int32 &error) |
SPL::int32 | setInputPortImportSubscription (const SPL::rstring &subscription, uint32 port) |
SPL::rstring | getInputPortImportFilterExpression (uint32 port, SPL::int32 &error) |
SPL::int32 | setInputPortImportFilterExpression (const SPL::rstring &filter, uint32 port) |
SPL::rstring | loadAndFormatResource (const SPL::rstring &toolkitName, const SPL::rstring &bundleName, const SPL::rstring &resourceID, const Tuple &substitutionValues) |
SPL::rstring | loadAndFormatResource (const SPL::rstring &toolkitName, const SPL::rstring &bundleName, const SPL::rstring &resourceID, const Tuple &substitutionValues, const SPL::rstring &locale) |
SPL::rstring | loadAndFormatResource (const SPL::rstring &toolkitName, const SPL::rstring &bundleName, const SPL::rstring &resourceID) |
SPL::rstring | loadAndFormatResource (const SPL::rstring &toolkitName, const SPL::rstring &bundleName, const SPL::rstring &resourceID, const SPL::rstring &locale) |
SPL::int32 | getPEOutputPortConnections (uint32 port, SPL::List &connections) |
SPL::int32 | getOutputPortCongestionFactor (uint32 port) |
C++ counterparts of SPL native functions that provide general utilities.
|
inline |
SPL::boolean SPL::Functions::Utility::isTraceable | ( | const Enum & | traceLevel | ) |
Determine whether a message at the given level would be traced.
traceLevel | Classification of log level (error/warn/info/debug/trace). Use the Level enumeration in the spl::Trace composite to specify the trace level. |
void SPL::Functions::Utility::appTrc | ( | const Enum & | traceLevel, |
const std::string & | message, | ||
const std::string & | aspect, | ||
const std::string & | file, | ||
uint32_t | line | ||
) |
Log a message in the tracing system.
traceLevel | Classification of log level (error/warn/info/debug/trace). Use the Level enumeration in the spl::Trace composite to specify the trace level. |
message | Message to be logged. |
aspect | Message category (for filtering). |
file | SPL filename at appTrc call. |
line | SPL line number at appTrc call. |
|
inline |
Log a message in the tracing system.
traceLevel | Classification of log level (error/warn/info/debug/trace). Use the Level enumeration in the spl::Trace composite to specify the trace level. |
message | Message to be logged. |
aspect | Message category (for filtering). |
file | SPL filename at appTrc call. |
line | SPL line number at appTrc call. |
|
inline |
Log a message in the tracing system.
traceLevel | Classification of log level (error/warn/info/debug/trace). Use the Level enumeration in the spl::Trace composite to specify the trace level. |
message | Message to be logged. |
aspect | Message category (for filtering). |
file | SPL filename at appTrc call. |
line | SPL line number at appTrc call. |
|
inline |
Log a message in the tracing system.
|
inline |
Log a message in the tracing system.
SPL::boolean SPL::Functions::Utility::isLoggable | ( | const Enum & | logLevel | ) |
Determine whether a message at the given level would be logged.
logLevel | Classification of log level (error/warn/info). Use the Level enumeration in the spl::Log composite to specify the log level. |
void SPL::Functions::Utility::appLog | ( | const Enum & | logLevel, |
const std::string & | message, | ||
const std::string & | aspect, | ||
const std::string & | file, | ||
uint32_t | line | ||
) |
Log a message in the logging system.
|
inline |
Log a message in the logging system.
|
inline |
Log a message in the logging system.
|
inline |
|
inline |
void SPL::Functions::Utility::log | ( | const Enum & | logLevel, |
const std::string & | message, | ||
const std::string & | aspect, | ||
const std::string & | file, | ||
uint32_t | line | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
void SPL::Functions::Utility::shutdownPE | ( | ) |
Shutdown the current processing element (PE).
SPL::boolean SPL::Functions::Utility::isShutdown | ( | ) |
Check if shutdown is requested.
void SPL::Functions::Utility::block | ( | double const | time | ) |
Block until shutdown is requested, or the specified amount of time has elapsed, whichever comes first.
time | Maximum wait time in seconds (could be fractional). |
SPL::int32 SPL::Functions::Utility::getChannel | ( | ) |
Get the parallel channel index.
SPL::int32 SPL::Functions::Utility::getMaxChannels | ( | ) |
Get the maximum number of parallel channels.
SPL::rstring SPL::Functions::Utility::getThisOperatorName | ( | ) |
Get the physical name of the operator.
SPL::rstring SPL::Functions::Utility::getThisOperatorLogicalName | ( | ) |
Get the logical name of the operator.
SPL::rstring SPL::Functions::Utility::getEnvironmentVariable | ( | SPL::rstring const & | name | ) |
Get the value of an environment variable.
name | Environment variable name. |
SPL::rstring SPL::Functions::Utility::getEnvironmentVariable | ( | SPL::rstring const & | name, |
SPL::rstring const & | defaultValue | ||
) |
Get the value of an environment variable.
name | Environment variable name. |
defaultValue | Default value for the environment variable. |
SPL::rstring SPL::Functions::Utility::getEnvironmentVariable | ( | SPL::rstring const & | name, |
SPL::boolean & | isSet | ||
) |
Get the value of an environment variable.
name | Environment variable name. |
isSet | This parameter is set to 'true' if the environment variable is found, otherwise to 'false'. This parameter can be used to differentiate between an empty value and an unset variable. |
void SPL::Functions::Utility::getInputPortMetricValue | ( | SPL::uint32 | port, |
int | name, | ||
SPL::int64 & | value | ||
) |
Get the specified input port metric value for the current operator.
port | Input port index. |
name | The name of the metric. |
value | Value of the specified input port metric for the current operator. |
SPLRuntimeInvalidIndexException | If the port is out of bounds. |
|
inline |
void SPL::Functions::Utility::getOutputPortMetricValue | ( | SPL::uint32 | port, |
int | name, | ||
SPL::int64 & | value | ||
) |
Get the specified output port metric value for the current operator.
port | Input port index. |
name | The name of the metric. |
value | Value of the specified input port metric for the current operator. |
SPLRuntimeInvalidIndexException | If the port is out of bounds. |
|
inline |
void SPL::Functions::Utility::getCustomMetricValue | ( | SPL::rstring const & | name, |
SPL::int64 & | value | ||
) |
Get the specified custom metric value for the current operator.
name | The name of the metric. |
value | Value of the specified custom metric for the current operator. |
SPLRuntimeInvalidMetricException | If the metric does not exist. |
|
inline |
Get the specified custom metric value for the current operator.
name | The name of the metric. |
value | Value of the specified custom metric for the current operator. |
SPLRuntimeInvalidMetricException | If the metric does not exist. |
void SPL::Functions::Utility::setCustomMetricValue | ( | SPL::rstring const & | name, |
SPL::int64 | value | ||
) |
Set the specified custom metric value for the current operator.
name | The name of the metric. |
value | Value to use. |
SPLRuntimeInvalidMetricException | If the metric does not exist. |
|
inline |
Set the specified custom metric value for the current operator.
name | The name of the metric. |
value | Value to use. |
SPLRuntimeInvalidMetricException | If the metric does not exist. |
void SPL::Functions::Utility::createCustomMetric | ( | SPL::rstring const & | name, |
SPL::rstring const & | description, | ||
const Enum & | kind, | ||
SPL::int64 | value | ||
) |
Create the specified custom metric for the current operator and set its initial value.
name | The name of the metric. |
value | The initial value for the metric. |
description | A description of the metric. |
kind | The kind of the metric (Metric::Gauge, Metric::Counter, or Metric::Time). |
SPLRuntimeInvalidMetricException | If the metric already exists. |
|
inline |
Create the specified custom metric for the current operator and set its initial value.
name | The name of the metric. |
value | The initial value for the metric. |
description | A description of the metric. |
kind | The kind of the metric (Gauge, Counter, or Time). |
SPLRuntimeInvalidMetricException | If the metric already exists. |
bool SPL::Functions::Utility::hasCustomMetric | ( | SPL::rstring const & | name | ) |
Check if the specified custom metric exists.
name | The name of the metric. |
|
inline |
Check if the specified custom metric exists.
name | The name of the metric. |
SPL::list<SPL::rstring> SPL::Functions::Utility::getCustomMetricNames | ( | ) |
Return the names of the custom metrics for the current operator.
SPL::rstring SPL::Functions::Utility::formatNumber | ( | const SPL::int64 | value | ) |
Format an integer using locale specific format. The number is returned as a string with the locale specific grouping.
value | Value to be formatted. |
SPL::rstring SPL::Functions::Utility::formatNumber | ( | const SPL::int64 | value, |
SPL::uint32 | width | ||
) |
Format an integer using locale specific format. The number is returned as a string with the locale specific grouping.
value | Value to be formatted. |
width | Minimal field width. |
SPL::rstring SPL::Functions::Utility::formatNumber | ( | const SPL::float64 | value | ) |
Format a float using locale specific format. The number is returned as a string with the locale specific grouping and decimal point.
value | Value to be formatted. |
SPL::rstring SPL::Functions::Utility::formatNumber | ( | const SPL::float64 | value, |
SPL::uint32 | width, | ||
SPL::uint32 | precision, | ||
bool | scientific | ||
) |
Format a float using locale specific format. The number is returned as a string with the locale specific grouping and decimal point.
value | Value to be formatted. |
width | Minimal field width. |
precision | Number of digits of precision. |
scientific | Set to 'true' if scientific form should be used. |
SPL::int32 SPL::Functions::Utility::parseNumber | ( | SPL::int64 & | number, |
SPL::rstring const & | text, | ||
SPL::int32 | base | ||
) |
Parse a string that represents a number, using the current locale. This function exposes the full capability of the underlying strtoll function.
text | String to parse. |
number | Variable to store the result. |
base | 0, or a number between 2 and 36 inclusive. |
SPL::int32 SPL::Functions::Utility::parseNumber | ( | SPL::int64 & | number, |
SPL::rstring const & | text | ||
) |
Parse a string that represents a base 10 number, using the current locale.
text | String to parse. |
number | Variable to store the result. |
SPL::int32 SPL::Functions::Utility::parseNumber | ( | SPL::int64 & | number, |
SPL::ustring const & | text | ||
) |
Parse a string that represents a number, using the current locale.
text | String to parse. |
number | Variable to store the result. |
SPL::int32 SPL::Functions::Utility::parseNumber | ( | SPL::float64 & | number, |
SPL::rstring const & | text | ||
) |
Parse a string that represents a number, using the current locale.
text | String to parse. |
number | Variable to store the result. |
SPL::int32 SPL::Functions::Utility::parseNumber | ( | SPL::float64 & | number, |
SPL::ustring const & | text | ||
) |
Parse a string that represents a number, using the current locale.
text | String to parse. |
number | Variable to store the result. |
SPL::rstring SPL::Functions::Utility::strerror | ( | const SPL::int32 | errnum | ) |
Convert an errno value to a string for intelligent printing.
errnum | Error number to convert to a string description. |
|
inline |
|
inline |
Convert a string in base 2 to 36 to an unsigned number. See POSIX strtoull.
value | String to convert. |
base | Conversion base. If 0, use leading characters to decide. Otherwise must be 2>= base <= 36. |
numCharsProcessed | Number of characters consumed from value during the conversion, or -1 if the conversion failed (invalid base or result out of range). |
|
inline |
|
inline |
Convert a string in base 2 to 36 to an signed number. See POSIX strtoll.
value | String to convert. |
base | Conversion base. If 0, use leading characters to decide. Otherwise must be 2>= base <= 36. |
numCharsProcessed | Number of characters consumed from value during the conversion, or -1 if the conversion failed (invalid base or result out of range). |
|
inline |
|
inline |
|
inline |
|
inline |
Write a string to stdout, followed by a newline, and then the output is flushed.
s | String to print. |
|
inline |
Write a string to stdout, followed by a newline, and then the output is flushed.
s | String to print. |
|
inline |
Write a string to stdout, followed by a newline, and then the output is flushed.
s | String to print. |
|
inline |
Write a string to stdout. The output is not flushed.
s | String to print. |
|
inline |
Write a string to stdout. The output is not flushed.
s | String to print. |
|
inline |
Write a string to stdout. The output is not flushed.
s | String to print. |
|
inline |
Write any SPL type to stdout, in serialized form, followed by a newline. For example, strings are quoted, and characters escaped. The output is then flushed.
t | Value to print. |
|
inline |
Flush all stdio output streams. Will ensure printString and print output is written to standard output.
|
inline |
Assign matching fields of a tuple from another one.
lhs | Destination tuple. |
rhs | Source tuple. |
|
inline |
Compute the hash of a value.
The hash function is designed to return a fixed output value for a given input value, and to reduce the likelihood of returning the same output value for different input values. The hash function can be used to map a set of input values to a smaller range of output values, for example, by performing a modulo operation on the returned hash value and the size of the desired range. In cases where there may be patterns in the input values (such as all even numbers), a more even distribution of output values may be possible by using a prime number as the modulus.
The current hash function uses the C++ standard library std::tr1::hash function.
v | Value. |
|
inline |
Compute hashes of a list of values, using the same hashing method as hashCode().
l | List of values. |
|
inline |
Compute hashes of a list of values, using the same hashing method as hashCode().
l | List of values. |
|
inline |
Miscellaneous.
Return the absolute pathname to the data directory for the Processing Element.
void SPL::Functions::Utility::swap | ( | T & | s1, |
T & | s2 | ||
) |
Swap any two SPL values
s1 | Value to swap. |
s2 | Value to swap. |
SPL::rstring SPL::Functions::Utility::mktemp | ( | const SPL::rstring & | templat | ) |
Return the name of a temporary file created using a template. The POSIX mkstemp function is used to create the file, and the file is closed.
templat | A pathname for the temporary file. The last six characters of templat must be "XXXXXX". |
|
inline |
Return the Job ID for the current job that this operator is executing in.
|
inline |
Return the name of the current job that this operator is executing in.
|
inline |
Return the name of the job group for the current job that this operator is executing in.
|
inline |
Return the name of the application that is executing this operator.
|
inline |
Return the PE ID for the current processing element that this operator is executing in.
|
inline |
Return the instance ID that the PE is running in.
|
inline |
Return the domain ID that the PE is running in.
|
inline |
Return the number of times the PE that the operator is executing in has been relaunched.
SPL::boolean SPL::Functions::Utility::isControlInputPort | ( | uint32 | port | ) |
Check if the input port is a control port.
port | Input port index. |
SPL::boolean SPL::Functions::Utility::isConsistentInputPort | ( | uint32 | port | ) |
Check if the input port is consistent. An input port is consistent if all its input streams are produced by operators that belong to the same consistent region.
port | Input port index. |
SPL::boolean SPL::Functions::Utility::isInConsistentRegion | ( | ) |
Check if the operator is in a consistent region.
SPL::boolean SPL::Functions::Utility::isStartOfConsistentRegion | ( | ) |
Check if the operator is a start operator of a consistent region.
SPL::boolean SPL::Functions::Utility::isEndOfConsistentRegion | ( | ) |
Check if the operator is an end operator of a consistent region.
SPL::boolean SPL::Functions::Utility::isTriggerOfConsistentRegion | ( | ) |
Check if the operator the trigger operator of an operator-driven consistent region.
SPL::int32 SPL::Functions::Utility::getConsistentRegionIndex | ( | ) |
Gets the index of the consistent region.
SPL::int64 SPL::Functions::Utility::getSequenceId | ( | ) |
Gets the current sequence identifier of a consistent region. It indicates the id that a drain or a reset should be associated to. After operator startup, this function returns 1. On operator restart, the function returns -1 until it has reset.
SPL::float64 SPL::Functions::Utility::getDrainTimeout | ( | ) |
Gets the drain timeout of a consistent region.
SPL::float64 SPL::Functions::Utility::getResetTimeout | ( | ) |
Gets the reset timeout of a consistent region.
SPL::int32 SPL::Functions::Utility::getResetAttempt | ( | ) |
If the operator is in a consistent region, this function returns the retry attempt of resetting the consistent region to a consistent state. If resetting, returns the current reset attempt. If not, this function returns the retry attempt of the last reset.
void SPL::Functions::Utility::resetConsistentRegion | ( | ) |
This function requests the ConsistentRegionControllerMXBean to restore the consistent region to the last established consistent state. This function can be used by operators when detecting an operator-specific transient failure. If the region is already being reset, a new reset attempt is triggered. If the operator is not in a consistent region, this function has no effect.
SPL::boolean SPL::Functions::Utility::evalPredicate | ( | const SPL::rstring & | splExpr, |
const Tuple & | tuple, | ||
SPL::int32 & | error | ||
) |
Evaluates the SPL predicate, represented as an rstring, using the given tuple. The predicate has the same limitations as the 'filter' parameter to the Import operator.
splExpr | SPL predicate expression to evaluate, in rstring form. |
tup | The tuple to use in the evaluation. |
error | 0 for success, greater than 0 indicates error parsing and/or evaluating splExpr against tuple. |
SPL::rstring SPL::Functions::Utility::getHostName | ( | ) |
Get the host name.
SPLRuntimeException | If unsuccessful. |
|
inline |
Get the short host name.
SPLRuntimeException | If unsuccessful. |
SPL::rstring SPL::Functions::Utility::getConfiguredHostName | ( | ) |
Get the hostname used by the streams instance for this host. This returns the full hostname (with domain) for the interface configured for use by the streams instance for this host. This may differ from the IP address for the name returned from getHostName() if there are multiple network interfaces on this host.
SPLRuntimeException | If unsuccessful. |
SPL::rstring SPL::Functions::Utility::getIPAddress | ( | ) |
Get the IP address for the current host.
SPL::int32 SPL::Functions::Utility::getOutputPortExportProperties | ( | List & | properties, |
uint32 | port | ||
) |
Get the export properties for an exported output port.
properties | Output list of tuple<rstring name, rstring value, rstring typ> representing the current output properties for this export port. 'name' is the name of the property. 'value' is a literal value of the correct type. 'typ' is one of: int64/float64/rstring/list<int64>/list<float64>/list<rstring>. |
port | Port number of the export port. |
SPL::int32 SPL::Functions::Utility::setOutputPortExportProperties | ( | const List & | properties, |
uint32 | port | ||
) |
Set the export properties for an exported output port.
properties | List of tuple<rstring name, rstring value, rstring typ> representing output properties for this export port. 'name' is the name of the property. 'value' is a literal value of the correct type. For string literals, the value must be in double quotes. 'typ' is one of: int64/float64/rstring/list<int64>/list<float64>/list<rstring>. |
port | Port number to be changed. |
SPL::int32 SPL::Functions::Utility::setOutputPortExportProperties | ( | const Tuple & | properties, |
uint32 | port | ||
) |
Set the export properties for an exported output port.
properties | Tuple representing output properties for this export port. |
port | Port number to be changed. |
SPL::rstring SPL::Functions::Utility::getInputPortImportSubscription | ( | uint32 | port, |
SPL::int32 & | error | ||
) |
Get the import subscription for an imported input port.
port | Port number of the imported port. |
error | Return code: 0 for success, 1 for invalid or not imported imported by subscription input port. |
SPL::int32 SPL::Functions::Utility::setInputPortImportSubscription | ( | const SPL::rstring & | subscription, |
uint32 | port | ||
) |
Set the import subscription for an imported input port.
subscription | String representing import subscription for this import port. |
port | Port number to be changed. |
SPL::rstring SPL::Functions::Utility::getInputPortImportFilterExpression | ( | uint32 | port, |
SPL::int32 & | error | ||
) |
Get the filter expression for an imported input port.
port | Port number of the imported port. |
error | Return code: 0 for success, 1 for invalid or not imported imported by subscription input port. |
SPL::int32 SPL::Functions::Utility::setInputPortImportFilterExpression | ( | const SPL::rstring & | filter, |
uint32 | port | ||
) |
Set the filter expression for an imported input port.
filter | String representing filter expression for this import port. An empty filter string removes the filter. |
port | Port number to be changed. |
SPL::rstring SPL::Functions::Utility::loadAndFormatResource | ( | const SPL::rstring & | toolkitName, |
const SPL::rstring & | bundleName, | ||
const SPL::rstring & | resourceID, | ||
const Tuple & | substitutionValues | ||
) |
Loads and formats a string from a toolkit resource. The execution locale is used.
toolkitName | The name of the toolkit that owns the resource. |
bundleName | The name of the resource bundle within the toolkit. |
resourceID | The ID of the resource to load. |
substitutionValues | A tuple containing substitution values. Note that the type and value of the attributes in the tuple are important. The name is used only for error reporting. |
SPLRuntimeUnsupportedSubstitutionTypeException | If the type of a substitution variable is not supported. |
SPL::rstring SPL::Functions::Utility::loadAndFormatResource | ( | const SPL::rstring & | toolkitName, |
const SPL::rstring & | bundleName, | ||
const SPL::rstring & | resourceID, | ||
const Tuple & | substitutionValues, | ||
const SPL::rstring & | locale | ||
) |
Loads and formats a string from a toolkit resource.
toolkitName | The name of the toolkit that owns the resource. |
bundleName | The name of the resource bundle within the toolkit. |
resourceID | The ID of the resource to load. |
substitutionValues | A tuple containing substitution values. Note that the type and value of the attributes in the tuple are important. The name is used only for error reporting. |
locale | The locale the message should be formatted in. It should be something like en_US.UTF-8. |
SPLRuntimeUnsupportedSubstitutionTypeException | If the type of a substitution variable is not supported. |
SPL::rstring SPL::Functions::Utility::loadAndFormatResource | ( | const SPL::rstring & | toolkitName, |
const SPL::rstring & | bundleName, | ||
const SPL::rstring & | resourceID | ||
) |
Loads a string from a toolkit resource. The execution locale is used.
toolkitName | The name of the toolkit that owns the resource. |
bundleName | The name of the resource bundle within the toolkit. |
resourceID | The ID of the resource to load. |
SPL::rstring SPL::Functions::Utility::loadAndFormatResource | ( | const SPL::rstring & | toolkitName, |
const SPL::rstring & | bundleName, | ||
const SPL::rstring & | resourceID, | ||
const SPL::rstring & | locale | ||
) |
Loads a string from a toolkit resource.
toolkitName | The name of the toolkit that owns the resource. |
bundleName | The name of the resource bundle within the toolkit. |
resourceID | The ID of the resource to load. |
locale | The locale the message should be formatted in. It should be something like en_US.UTF-8. |
SPL::int32 SPL::Functions::Utility::getPEOutputPortConnections | ( | uint32 | port, |
SPL::List & | connections | ||
) |
Return the connection information for an output port that connects to another PE.
port | Port number. |
connections | Output list of information for each output connection. |
SPL::int32 SPL::Functions::Utility::getOutputPortCongestionFactor | ( | uint32 | port | ) |
Return the maximum congestion factor for all connections from an output port that connects to another PE.
port | Port number. |