Package net.sf.basedb.opengrid
Class OpenGridCluster.Info
java.lang.Object
net.sf.basedb.opengrid.OpenGridCluster.Info
- Enclosing class:
OpenGridCluster
Holds information about the Open Grid cluster together with
a timestamp for caching purposes.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionInfo
(ClusterConfig cfg, Exception ex) Constructor to use when connecting to the host fails.Info
(OpenGridSession session) -
Method Summary
Modifier and TypeMethodDescriptionorg.json.simple.JSONObject
asJSONObject
(JSONOptions options) Get the information as a JSON object.long
created()
The timestamp when this information was created.Get the cached result of the call toOpenGridSession.getHostInfo()
.Get the cached result of the call toOpenGridSession.getOpenGridInfo()
.int
Get the cached result of the call toOpenGridSession.getTimeAdjustment()
.boolean
TRUE if was possible to connect to the cluster, FALSE otherwise.
-
Field Details
-
created
private final long created -
hostInfo
-
ogsInfo
-
timeAdjustment
private final int timeAdjustment -
error
private final boolean error -
connected
private final boolean connected
-
-
Constructor Details
-
Info
Info(OpenGridSession session) -
Info
Info(ClusterConfig cfg, Exception ex) Constructor to use when connecting to the host fails. The exception should be the exception thrown from theOpenGridCluster.connect(int)
method.- Since:
- 1.4
-
-
Method Details
-
created
public long created()The timestamp when this information was created. -
isConnected
public boolean isConnected()TRUE if was possible to connect to the cluster, FALSE otherwise.- Since:
- 1.4
-
getHostInfo
Get the cached result of the call toOpenGridSession.getHostInfo()
. -
getOpenGridInfo
Get the cached result of the call toOpenGridSession.getOpenGridInfo()
. -
getTimeAdjustment
public int getTimeAdjustment()Get the cached result of the call toOpenGridSession.getTimeAdjustment()
. -
asJSONObject
Get the information as a JSON object.
-