com.groiss.cluster
Class ClusterInfo

java.lang.Object
  extended by com.groiss.cluster.ClusterInfo

public class ClusterInfo
extends java.lang.Object

This class can be used to aquire cluster specific data.


Constructor Summary
ClusterInfo()
           
 
Method Summary
static java.lang.String getMyNodeId()
          Gets the id of this node.
static boolean isClustered()
          Determines if the system is clustered.
static boolean isMainNode(boolean withDBCheck)
          Determines if this node is the main cluster node which runs the cluster timers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterInfo

public ClusterInfo()
Method Detail

isClustered

public static boolean isClustered()
Determines if the system is clustered.

Returns:
true, if the node is part of a cluster, false otherwise.

isMainNode

public static boolean isMainNode(boolean withDBCheck)
                          throws java.lang.Exception
Determines if this node is the main cluster node which runs the cluster timers.

Parameters:
withDBCheck - if false, the check is done in memory, if true the check is done by consulting the database.
Returns:
true, if the system is clustered and the node is the main node.
Throws:
java.lang.Exception

getMyNodeId

public static java.lang.String getMyNodeId()
Gets the id of this node.

Returns:
The id of this node, or null if the system is not clustered.


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.