com.microstrategy.web.objects.WebClusterAdmin |
WebClusterAdmin is an interface from which a user can connect to or disconnect from an Intelligence Server Cluster, monitor the Intelligence Server Clusters the API is currently connecting to, monitor the connection pool used to connect the API and the Intelligence Servers and set the connection pool size to tune the performance.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract WebClusterNode | connect(String nodeName, int port, int initialPoolSize) | ||||||||||
abstract WebClusterNode |
connect(String nodeName, int port, int initialPoolSize, int maxPoolSize)
Connects the Web API to an Intelligence Server cluster.
| ||||||||||
abstract WebClusterNode | connect(String nodeName, int port) | ||||||||||
abstract void |
disconnect(String nodeName)
This method is used to disconnect from an Intelligence Server Cluster.
| ||||||||||
abstract boolean |
getAutoConnect()
Returns the current autoConnect setting on the XMLAPI.
| ||||||||||
abstract WebCluster |
getCluster(String nodeName)
This method returns a
WebCluster interface for a given node name. | ||||||||||
abstract WebClusterInfos | getClusterInfos() | ||||||||||
abstract WebClusterNode |
getClusterNode(String nodeName)
Returns an
WebClusterNode interface for a given node name. | ||||||||||
abstract WebClusters |
getClusters()
This method returns a collection of Intelligence Server Clusters representing all clusters that the API is connected
to.
| ||||||||||
abstract boolean |
getEncryption()
Returns whether the API is set to use encryption when talking to the Intelligence Server.
| ||||||||||
abstract EncryptionMode |
getEncryptionMode()
Returns the current
EncryptionMode configured. | ||||||||||
abstract boolean |
getKeepAlive()
Returns the keepAlive setting on the XMLAPI.
| ||||||||||
abstract int |
getRequestTimeOutMillis()
Returns the number of milliseconds that the Web API will wait for a Server to respond to a request.
| ||||||||||
abstract int |
getServerBusyTimeOutMillis()
Returns the number of milliseconds that a request waits for a "free" connection before returning the "Server too
busy" error message.
| ||||||||||
abstract void |
refreshAllClusters()
Refreshes all clusters that the Web API is connected to.
| ||||||||||
abstract void |
refreshCluster(String nodeName)
Refreshes the cluster information that the API returns.
| ||||||||||
abstract void |
setAutoConnect(boolean autoConnect)
Sets the autoConnect setting on the XMLAPI.
| ||||||||||
abstract void |
setEncryption(boolean encryption)
Sets whether the API should use encryption when talking to the Intelligence Server.
| ||||||||||
abstract void |
setEncryptionMode(EncryptionMode mode)
Sets whether the API should use encryption when talking to the Intelligence Server,
and the nature of the encryption mode.
| ||||||||||
abstract void |
setInitConnectionPoolFailureTolerance(int connectionFailureTolerance)
sets the number of times that the Web API could fail for initialize the connection pool.
| ||||||||||
abstract void |
setKeepAlive(boolean keepAlive)
Sets the keepAlive setting on the XMLAPI.
| ||||||||||
abstract void |
setRequestTimeOutMillis(int newTimeoutMillis)
Sets the number of milliseconds that the Web API will wait for a Server to respond to a request.
| ||||||||||
abstract void |
setServerBusyTimeOutMillis(int newTimeout)
Sets the number of milliseconds that a request waits for a "free" connection before returning the "Server too
busy" error message.
|
nodeName | The name of the cluster node(Intelligence Server name). |
---|---|
port | The port number that the Intelligence Server is listening on. [Default=0] |
initialPoolSize | The initial size of the connection pool. [Default=4] |
WebClusterNode
object used to connect to the Server.WebObjectsException | Signals an error condition while connecting to an Intelligence Server cluster. |
---|
Connects the Web API to an Intelligence Server cluster.
A connection is a TCP/IP connection between a Web API and a DSS Server. It is used by the API to pass a request (create session request, execute report request etc.) to and retrieve the response from the DSS Server.
The method establishes the connection pool for a given DSS Server Cluster. The NodeName is the name of a DSS Server in the Cluster. All the servers in the cluster should use the same port number. The InitialPoolSize is for each server in the cluster. If the default values are used, this method will create four connections to each server initially.
Before the Web API can handle any request, a connection pool needs to be established. When a Web request comes in, the API gets a connection from the connection pool to serve the request. Connections in the connection pool are initially in free status. Once used to serve a Web request, they are in busy status. Once a request is completed (session ID returned for create session, messageID returned after executing a report for example), the connection is returned to the connection pool in free status.
When the API detects that the free connections in a connection pool is too low (less than two connections) and the connection pool has not reached the maximum pool size, it dynamically expands the connection pool. In the case when the connection pool reaches its maximum pool size, if a Web request comes in when all connections are busy, the request waits for a free connection. The time to wait is configurable through this admin interface. When the waiting time is up and there is still no free connections, a Server too busy error is returned. Through this admin interface, an administrator can monitor the status of the connection pool. When all the connections in the connection pool are always stay in busy status, that means a lot of the Web users receives Server too busy messages. This is when the administrator needs to either adjust the max-wait time out setting or increase the connection pool size.
The API also balances the load among cluster nodes. The load is currently measured as the number of logins to a server.
nodeName | The name of the cluster node(Intelligence Server name). |
---|---|
port | The port number that the Intelligence Server is listening on. [Default=0] |
initialPoolSize | The initial size of the connection pool. [Default=4] |
maxPoolSize | The maximum size of the connection pool. [Default=100] |
WebClusterNode
object used to connect to the Server.WebObjectsException | Signals an error condition while connecting to an Intelligence Server cluster. |
---|
nodeName | The name of the cluster node(Intelligence Server name). |
---|---|
port | The port number that the Intelligence Server is listening on. [Default=0] |
WebClusterNode
object used to connect to the Server.WebObjectsException | Signals an error condition while connecting to an Intelligence Server cluster. |
---|
This method is used to disconnect from an Intelligence Server Cluster.
This method will disconnect the API from a DSS Server Cluster. The nodeName is the name of a server in the cluster. The "busy" connections will not be disconnected and destroyed until they are returned to the "free" status. This means that this method will disconnect the connections gracefully. All ongoing requests will have a chance to be completed.
nodeName | The name of the Intelligence Server. |
---|
Returns the current autoConnect setting on the XMLAPI. This setting is a global flag; it will affect all threads contacting the Intelligence Server.
This method returns a WebCluster
interface for a given node name. The returned WebCluster
interface
is a collection of Cluster Nodes(Intelligence Servers) that the given cluster node belongs to.
The cluster information returned by this method may not be the latest. To get the latest cluster membership or the load for each cluster node, you need to call RefreshCluster(nodeName) first.
nodeName | The name of an Intelligence Server that the API is currently connected to. |
---|
WebClusterNode
. It will return a null object if the node was not found.WebObjectsException | Signals an error condition while getting the cluster. |
---|
Returns an WebClusterNode
interface for a given node name. The returned WebClusterNode
interface contains
the properties of the cluster node. Through this interface, a user can get the node name, load, connection pool
size, the number of busy connections and the number of free connections. The connection pool size can also be
set through this interface.
The load of the cluster node returned by this method may not be the latest. To get the latest load for this cluster node, you need to call RefreshCluster(NodeName) first.
nodeName | The name of the Intelligence Server. The API must be connected to this server. |
---|
WebObjectsException | Signals an error condition while getting the cluster node. |
---|
This method returns a collection of Intelligence Server Clusters representing all clusters that the API is connected to.
The cluster information returned by this method may not be the latest. To get the latest cluster membership or the load for each cluster node, you need to call RefreshCluster first.
WebObjectsException | Signals an error condition while getting the clusters. |
---|
Returns whether the API is set to use encryption when talking to the Intelligence Server.
getEncryptionMode()
returns OFF
, otherwise true.Returns the keepAlive setting on the XMLAPI. By default, this is false. When keep alive on this interface is true,
all connections between web server and Intelligence Servers will be kept alive. When keep alive on this interface
is false, the keep alive property of a particular connection will be determined by the keep alive setting
on WebClusterNode
interface.
Returns the number of milliseconds that the Web API will wait for a Server to respond to a request.
Returns the number of milliseconds that a request waits for a "free" connection before returning the "Server too busy" error message.
Refreshes all clusters that the Web API is connected to.
WebObjectsException | Signals an error condition while refreshing the cluster. |
---|
Refreshes the cluster information that the API returns. It only refreshes the cluster that the given node belongs to. This method should be called if you want to get the latest cluster membership information or the load for each cluster node.
nodeName | The name of a node in the cluster to refresh. |
---|
WebObjectsException | Signals an error condition while refreshing the cluster. |
---|
Sets the autoConnect setting on the XMLAPI. By default, this is true; if it is false, then the XMLAPI will never connect to a server unless the connect method is called explicitly. This setting affects the whole web application - it does not have to be set on a per-server basis.
autoConnect | The new value to use for the auto-reconnect setting. |
---|
Sets whether the API should use encryption when talking to the Intelligence Server.
If set to true, we will configure setEncryptionMode(EncryptionMode)
to use AES
. It is recommended to use
setEncryptionMode(EncryptionMode)
instead of this method.
encryption | True if encryption should be used, false otherwise. |
---|
Sets whether the API should use encryption when talking to the Intelligence Server,
and the nature of the encryption mode. Some encryption modes like SSL
may require some additional configuration - also see
EncryptionModeConfigurationSSL
.
sets the number of times that the Web API could fail for initialize the connection pool.
Sets the keepAlive setting on the XMLAPI. By default, this is false. When keep alive on this interface is true,
all connections between web server and Intelligence Servers will be kept alive. When keep alive on this interface
is false, the keep alive property of a particular connection will be determined by the keep alive setting
on WebClusterNode
interface.
keepAlive | The new value to use for the keep alive setting. |
---|
Sets the number of milliseconds that the Web API will wait for a Server to respond to a request.
newTimeoutMillis | The timeout, in milliseconds, for requests to the Intelligence Server. |
---|
Sets the number of milliseconds that a request waits for a "free" connection before returning the "Server too busy" error message.
newTimeout | The new value for this timeout. |
---|