public class ServerStatusResponse extends Object
Response object for the "server status" function of the web-service API.
This object is primarily intended to facilitate the JSON serialization of the data provided by the API controller. For this reason, it does not perform any checks on the parameters used to construct the object.
| Constructor and Description |
|---|
ServerStatusResponse(String cassandraClusterName,
String cassandraError,
String cassandraKeyspaceName,
int channelsDisconnected,
int channelsError,
int channelsTotal,
UUID serverId,
long serverLastOnlineTime,
String serverName,
boolean serverOnline,
long totalSamplesDropped,
long totalSamplesWritten)
Creates a server status response.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getCassandraClusterName()
Returns the human-readable name of the Cassandra cluster to which this
server is connected.
|
String |
getCassandraError()
Returns the error message indicating a problem that occurred while trying
to connect to the Cassandra cluster.
|
String |
getCassandraKeyspaceName()
Returns the name of the Cassandra keyspace which is used by the Cassandra
PV Archiver.
|
int |
getChannelsDisconnected()
Returns the number of channels that are in the disconnected state.
|
int |
getChannelsError()
Returns the number of channels that are in the error state.
|
int |
getChannelsTotal()
Returns the total number of channels on this server.
|
UUID |
getServerId()
Returns the ID of the server.
|
long |
getServerLastOnlineTime()
Returns the last time this server successfully registered itself with the
cluster.
|
String |
getServerName()
Returns the human-readable name of the server.
|
long |
getTotalSamplesDropped()
Returns the total number of samples that have been dropped (discarded) by
this server because they arrived to quickly and could not be written in
time.
|
long |
getTotalSamplesWritten()
Returns the total number of samples that have been written (persisted) by
this server.
|
int |
hashCode() |
boolean |
isServerOnline()
Tells whether the server considers itself to be online.
|
String |
toString() |
public ServerStatusResponse(String cassandraClusterName, String cassandraError, String cassandraKeyspaceName, int channelsDisconnected, int channelsError, int channelsTotal, UUID serverId, long serverLastOnlineTime, String serverName, boolean serverOnline, long totalSamplesDropped, long totalSamplesWritten)
cassandraClusterName - human-readable name of the Cassandra cluster to which this
server is connected. May be null if the server is
currently not connected to a Cassandra cluster. In this case,
cassandraError is not null.cassandraError - error message indicating a problem that occurred while trying
to connect to the Cassandra cluster. This is null
if there is no problem.cassandraKeyspaceName - name of the Cassandra keyspace which is used by the Cassandra
PV Archiver. May be null if the server is
currently not connected to a Cassandra cluster. In this case,
cassandraError is not null.channelsDisconnected - number of channels that are in the disconnected state.channelsError - number of channels that are in the error state.channelsTotal - total number of channels on this server. If the server has not
been initialized yet (e.g. because it cannot connect to the
database), this number is zero, even if there are channels
that belong to the server.serverId - ID of the server.serverLastOnlineTime - last time this server successfully registered itself with the
cluster. The time is specified as the number of milliseconds
since January 1st, 1970, 00:00:00 UTC. This number might be
zero if the server has not successfully registered itself with
the cluster since it was started.serverName - human-readable name of the server. Typically, this is the
hostname of the server.serverOnline - flag indicating whether the server considers itself to be
online. The server considers itself online when a sufficient
amount of time has passed since successfully registering with
the cluster and the renewal of the registration has not failed
since.totalSamplesDropped - total number of samples that have been dropped (discarded) by
this server because they arrived to quickly and could not be
written in time. This counter is reset when the server is
restarted.totalSamplesWritten - total number of samples that have been written (persisted) by
this server. This counter is reset when the server is
restarted.public String getCassandraClusterName()
null if the server is currently
not connected to a Cassandra cluster. In this case, the value returned by
getCassandraError() is not null.null if the name is
not available.public String getCassandraError()
null if there
is no problem.null if there is no
error.public String getCassandraKeyspaceName()
null if the server is currently not
connected to a Cassandra cluster. In this case, the value returned by
getCassandraError() is not null.null if the name
is not available.public int getChannelsDisconnected()
public int getChannelsError()
public int getChannelsTotal()
public UUID getServerId()
public long getServerLastOnlineTime()
public String getServerName()
public boolean isServerOnline()
true if the server is currently online,
false if it is offline.public long getTotalSamplesDropped()
public long getTotalSamplesWritten()
Copyright © 2011–2017 aquenos GmbH. All rights reserved.