StreamBase C++ API
7.7.1.3
|
The StreamBase Admin Client API. More...
#include <StreamBaseAdminClient.hpp>
Public Member Functions | |
StreamBaseAdminClient (const StreamBaseURI &uri) | |
Creates a StreamBase client and establishes a connection to a remote server. More... | |
StreamBaseAdminClient (const std::vector< StreamBaseURI > &uris=StreamBaseURI::vectorFromEnvironment()) | |
Creates a StreamBase client and establishes a connection to a remote server. More... | |
StreamBaseAdminClient (const std::vector< StreamBaseURI > &uris, sb::ClientSettings &settings) | |
Creates a StreamBase client and establishes a connection to a remote server. More... | |
virtual | ~StreamBaseAdminClient () |
Destroys a session. More... | |
std::string | shutdown () |
Shuts down the application/sbd. More... | |
std::string | shutdown (const std::string &name) |
Shuts down a container or a Java Operator. More... | |
void | shutdownOperators (std::vector< std::string > &operatorNames) |
Shuts down Java operators in an application. More... | |
void | suspendOperators (std::vector< std::string > &operatorNames) |
Suspends Java operators in an application. More... | |
void | restartOperators (std::vector< std::string > &operatorNames) |
Restarts one or more Operators in an application. More... | |
void | suspend (const std::string &name) |
Suspends a container or a Java Operator. More... | |
void | restartContainer (const std::string &name) |
Restarts a container. More... | |
void | resume (const std::string &name) |
Resumes a container or a Java Operator. More... | |
void | resumeOperators (std::vector< std::string > &operatorNames) |
Resumes Java operators in an application. More... | |
void | getOperatorProperties (const std::string &operatorName, std::vector< std::string > &result) |
For the given Operator, return its set of properties and their values. More... | |
std::string | getOperatorProperty (const std::string &operatorName, const std::string &propertyName) |
Return the value of the given property on the given Operator. More... | |
void | setOperatorProperty (const std::string &operatorName, const std::string &propertyName, const std::string &value) |
On the given Operator, set the given property to the given value. More... | |
void | modifyApplication (const std::string &application) |
Adds an application to the default container. More... | |
std::vector< std::string > | addContainer (const std::string &containerName, const std::string &applicationText, const std::vector< std::string > &options) |
Add an application to the given container. More... | |
std::vector< std::string > | addDeploy (const std::string &applicationText, const std::vector< std::string > &options=std::vector< std::string >()) |
Add a deploy file to the server. More... | |
std::vector< std::string > | removeContainer (const std::string &containerName, const std::vector< std::string > &options=std::vector< std::string >()) |
Remove a container. More... | |
std::vector< std::string > | modifyContainer (const std::string &containerName, const std::vector< std::string > &options) |
Modify the given container. More... | |
void | listConnections (std::vector< std::string > &result, const std::vector< std::string > &option=std::vector< std::string >()) |
Lists all Connections to the StreamBaseServer. More... | |
void | killConnection (const std::string &connectionId, std::vector< std::string > &status) |
Kill the connection with the given connectionId. More... | |
void | killAllConnections (std::vector< std::string > &status) |
Kill all connected clients. More... | |
std::vector< std::string > | manageJdbcConnections (const std::vector< std::string > &options) |
Manage JDBC connections. More... | |
LeadershipStatus | getLeadershipStatus () |
Get the leadership status of the server. More... | |
void | setLeadershipStatus (LeadershipStatus leadershipStatus) |
Set the leadership status of the server. More... | |
void | drain (const std::string &containerName) |
Drains the application: waits until there are no more tuples at all in the application and then shuts the application. More... | |
sb::ClientSettings & | getSettings () |
Get the settings for the client. More... | |
The StreamBase Admin Client API.
Connects to a StreamBase node over the network, via XML/RPC
sb::StreamBaseAdminClient::StreamBaseAdminClient | ( | const StreamBaseURI & | uri | ) |
Creates a StreamBase client and establishes a connection to a remote server.
sb::StreamBaseAdminClient::StreamBaseAdminClient | ( | const std::vector< StreamBaseURI > & | uris = StreamBaseURI::vectorFromEnvironment() | ) |
Creates a StreamBase client and establishes a connection to a remote server.
Note: The StreamBaseAdminClient only supports 1 URI in the list.
sb::StreamBaseAdminClient::StreamBaseAdminClient | ( | const std::vector< StreamBaseURI > & | uris, |
sb::ClientSettings & | settings | ||
) |
Creates a StreamBase client and establishes a connection to a remote server.
Note: The StreamBaseAdminClient only supports 1 URI in the list.
|
virtual |
Destroys a session.
std::vector<std::string> sb::StreamBaseAdminClient::addContainer | ( | const std::string & | containerName, |
const std::string & | applicationText, | ||
const std::vector< std::string > & | options | ||
) |
Add an application to the given container.
containerName | the name of the container to add this to |
applicationText | binary content from a .sbar file, xml from an EventFlow application, or StreamSQL text. The character set is assumed UTF-8. |
options | a list of options for the added container. Run "sbadmin addContainer –help" for a complete list. |
std::vector<std::string> sb::StreamBaseAdminClient::addDeploy | ( | const std::string & | applicationText, |
const std::vector< std::string > & | options = std::vector< std::string >() |
||
) |
Add a deploy file to the server.
deployText | binary content from a .sbar file, or xml from an .sbdeploy file. The character set is assumed UTF-8. |
options | a list of options. Currently only supports –verbose as an argument |
void sb::StreamBaseAdminClient::drain | ( | const std::string & | containerName | ) |
Drains the application: waits until there are no more tuples at all in the application and then shuts the application.
Blocks until this is complete. has no effect if the server is not running
LeadershipStatus sb::StreamBaseAdminClient::getLeadershipStatus | ( | ) |
Get the leadership status of the server.
StreamBaseException |
void sb::StreamBaseAdminClient::getOperatorProperties | ( | const std::string & | operatorName, |
std::vector< std::string > & | result | ||
) |
For the given Operator, return its set of properties and their values.
std::string sb::StreamBaseAdminClient::getOperatorProperty | ( | const std::string & | operatorName, |
const std::string & | propertyName | ||
) |
Return the value of the given property on the given Operator.
|
inline |
Get the settings for the client.
void sb::StreamBaseAdminClient::killAllConnections | ( | std::vector< std::string > & | status | ) |
Kill all connected clients.
void sb::StreamBaseAdminClient::killConnection | ( | const std::string & | connectionId, |
std::vector< std::string > & | status | ||
) |
Kill the connection with the given connectionId.
void sb::StreamBaseAdminClient::listConnections | ( | std::vector< std::string > & | result, |
const std::vector< std::string > & | option = std::vector< std::string >() |
||
) |
Lists all Connections to the StreamBaseServer.
result | the result |
option |
std::vector<std::string> sb::StreamBaseAdminClient::manageJdbcConnections | ( | const std::vector< std::string > & | options | ) |
Manage JDBC connections.
void sb::StreamBaseAdminClient::modifyApplication | ( | const std::string & | application | ) |
Adds an application to the default container.
application | a string containing the text of an application EventFlow, StreamSQL or binary of a sbar file |
std::vector<std::string> sb::StreamBaseAdminClient::modifyContainer | ( | const std::string & | containerName, |
const std::vector< std::string > & | options | ||
) |
Modify the given container.
containerName | containerName the container name to modify |
options | a list of options to modify a container. Run "sbadmin modifyContainer –help" for a complete list. |
std::vector<std::string> sb::StreamBaseAdminClient::removeContainer | ( | const std::string & | containerName, |
const std::vector< std::string > & | options = std::vector< std::string >() |
||
) |
Remove a container.
containerName | the name of the container to add this to |
options | a list of options. Currently only supports –verbose as an argument |
void sb::StreamBaseAdminClient::restartContainer | ( | const std::string & | name | ) |
Restarts a container.
void sb::StreamBaseAdminClient::restartOperators | ( | std::vector< std::string > & | operatorNames | ) |
Restarts one or more Operators in an application.
void sb::StreamBaseAdminClient::resume | ( | const std::string & | name | ) |
Resumes a container or a Java Operator.
void sb::StreamBaseAdminClient::resumeOperators | ( | std::vector< std::string > & | operatorNames | ) |
Resumes Java operators in an application.
void sb::StreamBaseAdminClient::setLeadershipStatus | ( | LeadershipStatus | leadershipStatus | ) |
void sb::StreamBaseAdminClient::setOperatorProperty | ( | const std::string & | operatorName, |
const std::string & | propertyName, | ||
const std::string & | value | ||
) |
On the given Operator, set the given property to the given value.
std::string sb::StreamBaseAdminClient::shutdown | ( | ) |
Shuts down the application/sbd.
std::string sb::StreamBaseAdminClient::shutdown | ( | const std::string & | name | ) |
Shuts down a container or a Java Operator.
void sb::StreamBaseAdminClient::shutdownOperators | ( | std::vector< std::string > & | operatorNames | ) |
Shuts down Java operators in an application.
void sb::StreamBaseAdminClient::suspend | ( | const std::string & | name | ) |
Suspends a container or a Java Operator.
void sb::StreamBaseAdminClient::suspendOperators | ( | std::vector< std::string > & | operatorNames | ) |
Suspends Java operators in an application.