Module com.aoapps.appcluster.core
Package com.aoapps.appcluster
Class ResourcePropertiesConfiguration<R extends Resource<R,N>,N extends ResourceNode<R,N>>
java.lang.Object
com.aoapps.appcluster.ResourcePropertiesConfiguration<R,N>
- All Implemented Interfaces:
ResourceConfiguration<R,
N>
- Direct Known Subclasses:
CronResourcePropertiesConfiguration
public abstract class ResourcePropertiesConfiguration<R extends Resource<R,N>,N extends ResourceNode<R,N>>
extends Object
implements ResourceConfiguration<R,N>
The configuration for one resource.
- Author:
- AO Industries, Inc.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final boolean
protected final String
protected final int
protected final AppClusterPropertiesConfiguration
protected final String
-
Constructor Summary
ModifierConstructorDescriptionprotected
ResourcePropertiesConfiguration
(AppClusterPropertiesConfiguration properties, String id) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getId()
int
abstract Set
<? extends ResourceNodePropertiesConfiguration<R, N>> Gets the source of per-node resource configurations.getType()
int
hashCode()
boolean
abstract R
newResource
(AppCluster cluster, Collection<? extends ResourceNode<?, ?>> resourceNodes) Creates a new resource from this configuration.toString()
-
Field Details
-
properties
-
id
-
enabled
protected final boolean enabled -
display
-
masterRecords
-
masterRecordsTtl
protected final int masterRecordsTtl -
type
-
-
Constructor Details
-
ResourcePropertiesConfiguration
protected ResourcePropertiesConfiguration(AppClusterPropertiesConfiguration properties, String id) throws AppClusterConfigurationException - Throws:
AppClusterConfigurationException
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getId
- Specified by:
getId
in interfaceResourceConfiguration<R extends Resource<R,
N>, N extends ResourceNode<R, N>> - See Also:
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceResourceConfiguration<R extends Resource<R,
N>, N extends ResourceNode<R, N>> - See Also:
-
getDisplay
- Specified by:
getDisplay
in interfaceResourceConfiguration<R extends Resource<R,
N>, N extends ResourceNode<R, N>> - See Also:
-
getMasterRecords
- Specified by:
getMasterRecords
in interfaceResourceConfiguration<R extends Resource<R,
N>, N extends ResourceNode<R, N>> - See Also:
-
getMasterRecordsTtl
public int getMasterRecordsTtl()- Specified by:
getMasterRecordsTtl
in interfaceResourceConfiguration<R extends Resource<R,
N>, N extends ResourceNode<R, N>> - See Also:
-
getType
- Specified by:
getType
in interfaceResourceConfiguration<R extends Resource<R,
N>, N extends ResourceNode<R, N>> - See Also:
-
getResourceNodeConfigurations
public abstract Set<? extends ResourceNodePropertiesConfiguration<R,N>> getResourceNodeConfigurations() throws AppClusterConfigurationExceptionDescription copied from interface:ResourceConfiguration
Gets the source of per-node resource configurations.- Specified by:
getResourceNodeConfigurations
in interfaceResourceConfiguration<R extends Resource<R,
N>, N extends ResourceNode<R, N>> - Throws:
AppClusterConfigurationException
-
newResource
public abstract R newResource(AppCluster cluster, Collection<? extends ResourceNode<?, ?>> resourceNodes) throws AppClusterConfigurationExceptionDescription copied from interface:ResourceConfiguration
Creates a new resource from this configuration.- Specified by:
newResource
in interfaceResourceConfiguration<R extends Resource<R,
N>, N extends ResourceNode<R, N>> - Throws:
AppClusterConfigurationException
-