com.atlassian.jira.cluster
Class ClusterNodePropertiesImpl

java.lang.Object
  extended by com.atlassian.jira.cluster.ClusterNodePropertiesImpl
All Implemented Interfaces:
ClusterNodeProperties

public class ClusterNodePropertiesImpl
extends Object
implements ClusterNodeProperties

Responsible for loading the cluster properties from file, if it exists

Since:
v6.1

Field Summary
static String JIRA_CLUSTER_CONFIG_PROPERTIES
           
static String JIRA_NODE_ID
           
static String JIRA_SHARED_HOME
           
 
Constructor Summary
ClusterNodePropertiesImpl(JiraHome jiraHome)
           
 
Method Summary
 String getNodeId()
          Get the node id for a clustered or HA installation.
 String getProperty(String property)
           
 String getSharedHome()
          Get the shared home for a clustered or HA installation.
 boolean isValid()
          whether the underlying cluster.properties file is valid or not
 void onClearCache(ClearCacheEvent event)
           
 boolean propertyFileExists()
          The cluster.properties file is optional.
 void refresh()
          Called to reload the cluster properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JIRA_CLUSTER_CONFIG_PROPERTIES

public static final String JIRA_CLUSTER_CONFIG_PROPERTIES
See Also:
Constant Field Values

JIRA_SHARED_HOME

public static final String JIRA_SHARED_HOME
See Also:
Constant Field Values

JIRA_NODE_ID

public static final String JIRA_NODE_ID
See Also:
Constant Field Values
Constructor Detail

ClusterNodePropertiesImpl

public ClusterNodePropertiesImpl(JiraHome jiraHome)
Method Detail

getProperty

@Nullable
public String getProperty(String property)
Specified by:
getProperty in interface ClusterNodeProperties
Parameters:
property - key for the property you want to look up
Returns:
String value of the property, null if it does not exist

getSharedHome

public String getSharedHome()
Description copied from interface: ClusterNodeProperties
Get the shared home for a clustered or HA installation. Will return null if no shared home is set.

Specified by:
getSharedHome in interface ClusterNodeProperties
Returns:

getNodeId

public String getNodeId()
Description copied from interface: ClusterNodeProperties
Get the node id for a clustered or HA installation. Will return null if no node id is set.

Specified by:
getNodeId in interface ClusterNodeProperties
Returns:

refresh

public void refresh()
Description copied from interface: ClusterNodeProperties
Called to reload the cluster properties.

Specified by:
refresh in interface ClusterNodeProperties

propertyFileExists

public boolean propertyFileExists()
Description copied from interface: ClusterNodeProperties
The cluster.properties file is optional. If it exists then JIRA is assumed to be in a cluster

Specified by:
propertyFileExists in interface ClusterNodeProperties
Returns:

isValid

public boolean isValid()
Description copied from interface: ClusterNodeProperties
whether the underlying cluster.properties file is valid or not

Specified by:
isValid in interface ClusterNodeProperties
Returns:

onClearCache

@EventListener
public void onClearCache(ClearCacheEvent event)


Copyright © 2002-2014 Atlassian. All Rights Reserved.