Module com.aoapps.appcluster.core
Package com.aoapps.appcluster
Class ResourcePropertiesConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>>
- java.lang.Object
-
- com.aoapps.appcluster.ResourcePropertiesConfiguration<R,RN>
-
- All Implemented Interfaces:
ResourceConfiguration<R,RN>
- Direct Known Subclasses:
CronResourcePropertiesConfiguration
public abstract class ResourcePropertiesConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>> extends Object implements ResourceConfiguration<R,RN>
The configuration for one resource.- Author:
- AO Industries, Inc.
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringdisplayprotected booleanenabledprotected Stringidprotected Set<? extends Name>masterRecordsprotected intmasterRecordsTtlprotected AppClusterPropertiesConfigurationpropertiesprotected Stringtype
-
Constructor Summary
Constructors Modifier Constructor Description protectedResourcePropertiesConfiguration(AppClusterPropertiesConfiguration properties, String id)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetDisplay()StringgetId()Set<? extends Name>getMasterRecords()intgetMasterRecordsTtl()abstract Set<? extends ResourceNodePropertiesConfiguration<R,RN>>getResourceNodeConfigurations()Gets the source of per-node resource configurations.StringgetType()inthashCode()booleanisEnabled()abstract RnewResource(AppCluster cluster, Collection<? extends ResourceNode<?,?>> resourceNodes)Creates a new resource from this configuration.StringtoString()
-
-
-
Field Detail
-
properties
protected final AppClusterPropertiesConfiguration properties
-
id
protected final String id
-
enabled
protected final boolean enabled
-
display
protected final String display
-
masterRecordsTtl
protected final int masterRecordsTtl
-
type
protected final String type
-
-
Constructor Detail
-
ResourcePropertiesConfiguration
protected ResourcePropertiesConfiguration(AppClusterPropertiesConfiguration properties, String id) throws AppClusterConfigurationException
- Throws:
AppClusterConfigurationException
-
-
Method Detail
-
toString
public String toString()
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
getId
public String getId()
- Specified by:
getIdin interfaceResourceConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>>- See Also:
Resource.getId()
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceResourceConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>>- See Also:
Resource.isEnabled()
-
getDisplay
public String getDisplay()
- Specified by:
getDisplayin interfaceResourceConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>>- See Also:
Resource.getDisplay()
-
getMasterRecords
public Set<? extends Name> getMasterRecords()
- Specified by:
getMasterRecordsin interfaceResourceConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>>- See Also:
Resource.getMasterRecords()
-
getMasterRecordsTtl
public int getMasterRecordsTtl()
- Specified by:
getMasterRecordsTtlin interfaceResourceConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>>- See Also:
Resource.getMasterRecordsTtl()
-
getType
public String getType()
- Specified by:
getTypein interfaceResourceConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>>- See Also:
Resource.getType()
-
getResourceNodeConfigurations
public abstract Set<? extends ResourceNodePropertiesConfiguration<R,RN>> getResourceNodeConfigurations() throws AppClusterConfigurationException
Description copied from interface:ResourceConfigurationGets the source of per-node resource configurations.- Specified by:
getResourceNodeConfigurationsin interfaceResourceConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>>- Throws:
AppClusterConfigurationException
-
newResource
public abstract R newResource(AppCluster cluster, Collection<? extends ResourceNode<?,?>> resourceNodes) throws AppClusterConfigurationException
Description copied from interface:ResourceConfigurationCreates a new resource from this configuration.- Specified by:
newResourcein interfaceResourceConfiguration<R extends Resource<R,RN>,RN extends ResourceNode<R,RN>>- Throws:
AppClusterConfigurationException
-
-