public final class ServerLoad extends Object implements DataSerializable
ServerLoadProbe.getLoad(ServerMetrics)
and indicates how heavily loaded the server is.
The values returned by getConnectionLoad()
and getSubscriptionConnectionLoad()
can be any number greater than 0. A larger load value means that the server has more load.
The values returned by getLoadPerConnection() and getLoadPerSubscriptionConnection are used to
estimate the effect of new connections before the connects are actually made to this server. The
load is estimated as
load + loadPerConnection*numAdditionalConnections.
DataSerializable.Replaceable
Constructor and Description |
---|
ServerLoad() |
ServerLoad(float connectionLoad,
float loadPerConnection,
float subscriptionConnectionLoad,
float loadPerSubscriptionConnection) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
void |
fromData(DataInput in)
Reads the state of this object as primitive data from the given
DataInput . |
float |
getConnectionLoad()
Get the load on the server due to client to server connections.
|
float |
getLoadPerConnection()
Get an estimate of the how much load each new connection will add to this server.
|
float |
getLoadPerSubscriptionConnection()
Get an estimate of the how much load each new subscriber will add to this server.
|
float |
getSubscriptionConnectionLoad()
Get the load on the server due to subscription connections.
|
int |
hashCode() |
void |
setConnectionLoad(float connectionLoad)
Set the load due to client to server connections.
|
void |
setLoadPerConnection(float loadPerConnection)
Set the estimated load per connection.
|
void |
setLoadPerSubscriptionConnection(float loadPerSubscriber)
Set the estimated load per subscription connection.
|
void |
setSubscriptionConnectionLoad(float subscriberLoad)
Set the load due to client subscriptions.
|
void |
toData(DataOutput out)
Writes the state of this object as primitive data to the given
DataOutput . |
String |
toString() |
public ServerLoad(float connectionLoad, float loadPerConnection, float subscriptionConnectionLoad, float loadPerSubscriptionConnection)
public ServerLoad()
public float getConnectionLoad()
public float getLoadPerConnection()
public float getSubscriptionConnectionLoad()
public float getLoadPerSubscriptionConnection()
public void setConnectionLoad(float connectionLoad)
connectionLoad
- the load due to client to server connectionspublic void setSubscriptionConnectionLoad(float subscriberLoad)
subscriberLoad
- he load due to client subscriptionspublic void setLoadPerConnection(float loadPerConnection)
loadPerConnection
- the estimated load per connectionpublic void setLoadPerSubscriptionConnection(float loadPerSubscriber)
loadPerSubscriber
- the estimated load per subscription connectionpublic void toData(DataOutput out) throws IOException
DataSerializable
DataOutput
.
Since 5.7 it is possible for any method call to the specified DataOutput
to throw
GemFireRethrowable
. It should not be caught by user code. If it is it
must be rethrown.
toData
in interface DataSerializable
out
- the DataOutput
to write toIOException
- A problem occurs while writing to out
public void fromData(DataInput in) throws IOException, ClassNotFoundException
DataSerializable
DataInput
.fromData
in interface DataSerializable
in
- the DataInput
to read fromIOException
- A problem occurs while reading from in
ClassNotFoundException
- A class could not be loaded while reading from in