Package com.atlassian.jira.cluster
Class ClusterNodePropertiesImpl
java.lang.Object
com.atlassian.jira.cluster.ClusterNodePropertiesImpl
- All Implemented Interfaces:
ClusterNodeProperties
Loads the cluster properties from the "cluster.properties" file, if it exists.
- Since:
- v6.1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the node id for a clustered or HA installation.getProperty(String property) getPropertySafely(String key) Get the shared home for a clustered or HA installation.booleanbooleanisValid()whether the underlying cluster.properties file is valid or notvoidonClearCache(ClearCacheEvent event) booleanThe cluster.properties file is optional.voidrefresh()Called to reload the cluster properties.
-
Field Details
-
JIRA_CLUSTER_CONFIG_PROPERTIES
- See Also:
-
JIRA_SHARED_HOME
- See Also:
-
JIRA_NODE_ID
- See Also:
-
-
Constructor Details
-
ClusterNodePropertiesImpl
-
-
Method Details
-
getProperty
- Specified by:
getPropertyin interfaceClusterNodeProperties- Parameters:
property- key for the property you want to look up- Returns:
- String value of the property, null if it does not exist
-
getPropertySafely
- Specified by:
getPropertySafelyin interfaceClusterNodeProperties- Parameters:
key- key for the property you want to look up- Returns:
- An optional containing the string value of the property, or empty if it does not exist
-
getNodeId
Description copied from interface:ClusterNodePropertiesGet the node id for a clustered or HA installation. Will return null if no node id is set.- Specified by:
getNodeIdin interfaceClusterNodeProperties- Returns:
-
refresh
public void refresh()Description copied from interface:ClusterNodePropertiesCalled to reload the cluster properties.- Specified by:
refreshin interfaceClusterNodeProperties
-
propertyFileExists
public boolean propertyFileExists()Description copied from interface:ClusterNodePropertiesThe cluster.properties file is optional. If it exists then JIRA is assumed to be in a cluster- Specified by:
propertyFileExistsin interfaceClusterNodeProperties- Returns:
-
isValid
public boolean isValid()Description copied from interface:ClusterNodePropertieswhether the underlying cluster.properties file is valid or not- Specified by:
isValidin interfaceClusterNodeProperties- Returns:
-
isClustered
public boolean isClustered()- Specified by:
isClusteredin interfaceClusterNodeProperties
-
onClearCache
-