public class AutoScalingConfig extends Object implements MapWriter
autoscaling.json
, which parses data
lazily.Modifier and Type | Class and Description |
---|---|
static class |
AutoScalingConfig.ActionConfig
Deprecated.
Bean representation of trigger action configuration.
|
static class |
AutoScalingConfig.TriggerConfig
Deprecated.
Bean representation of trigger config.
|
static class |
AutoScalingConfig.TriggerListenerConfig
Deprecated.
Bean representation of trigger listener config.
|
MapWriter.EntryWriter
Constructor and Description |
---|
AutoScalingConfig(byte[] utf8)
Deprecated.
Construct from bytes that represent a UTF-8 JSON string.
|
AutoScalingConfig(Map<String,Object> jsonMap)
Deprecated.
Construct from a JSON map representation.
|
AutoScalingConfig(Policy policy,
Map<String,AutoScalingConfig.TriggerConfig> triggerConfigs,
Map<String,AutoScalingConfig.TriggerListenerConfig> listenerConfigs,
Map<String,Object> properties,
int zkVersion)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Deprecated.
|
boolean |
equals(Object o)
Deprecated.
|
Policy |
getPolicy()
Deprecated.
Get
Policy configuration. |
Map<String,Object> |
getProperties()
Deprecated.
|
Map<String,AutoScalingConfig.TriggerConfig> |
getTriggerConfigs()
Deprecated.
Get trigger configurations.
|
Map<String,AutoScalingConfig.TriggerListenerConfig> |
getTriggerListenerConfigs()
Deprecated.
Get listener configurations.
|
int |
getZkVersion()
Deprecated.
Return the znode version that was used to create this configuration.
|
int |
hashCode()
Deprecated.
|
boolean |
hasTriggerForEvents(TriggerEventType... types)
Deprecated.
Check whether triggers for specific event type exist.
|
boolean |
isEmpty()
Deprecated.
Return true if the source
autoscaling.json was empty, false otherwise. |
String |
toString()
Deprecated.
|
AutoScalingConfig |
withoutTriggerConfig(String name)
Deprecated.
Create a copy of the config without a trigger configuration.
|
AutoScalingConfig |
withoutTriggerListenerConfig(String name)
Deprecated.
Create a copy of the config without a trigger listener configuration.
|
AutoScalingConfig |
withPolicy(Policy policy)
Deprecated.
Create a copy of the config with replaced policy.
|
AutoScalingConfig |
withProperties(Map<String,Object> properties)
Deprecated.
Create a copy of the config with replaced properties.
|
AutoScalingConfig |
withTriggerConfig(AutoScalingConfig.TriggerConfig config)
Deprecated.
Create a copy of the config with replaced trigger configuration
|
AutoScalingConfig |
withTriggerConfigs(Map<String,AutoScalingConfig.TriggerConfig> configs)
Deprecated.
Create a copy of the config with replaced trigger configurations.
|
AutoScalingConfig |
withTriggerListenerConfig(AutoScalingConfig.TriggerListenerConfig config)
Deprecated.
Create a copy of the config with replaced trigger listener configuration.
|
AutoScalingConfig |
withTriggerListenerConfigs(Map<String,AutoScalingConfig.TriggerListenerConfig> configs)
Deprecated.
Create a copy of the config with replaced trigger listener configurations.
|
void |
writeMap(MapWriter.EntryWriter ew)
Deprecated.
|
finalize, getClass, notify, notifyAll, wait, wait, wait
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
public AutoScalingConfig(byte[] utf8)
utf8
- config datapublic AutoScalingConfig(Map<String,Object> jsonMap)
jsonMap
- JSON map representation of the config. Note that this map is evaluated lazily, and
outside modifications may cause unpredictable behavior.public AutoScalingConfig(Policy policy, Map<String,AutoScalingConfig.TriggerConfig> triggerConfigs, Map<String,AutoScalingConfig.TriggerListenerConfig> listenerConfigs, Map<String,Object> properties, int zkVersion)
public boolean isEmpty()
autoscaling.json
was empty, false otherwise.public Map<String,AutoScalingConfig.TriggerConfig> getTriggerConfigs()
public boolean hasTriggerForEvents(TriggerEventType... types)
types
- list of event typespublic Map<String,AutoScalingConfig.TriggerListenerConfig> getTriggerListenerConfigs()
public AutoScalingConfig withProperties(Map<String,Object> properties)
properties
- the new properties mappublic AutoScalingConfig withPolicy(Policy policy)
policy
- new policypublic AutoScalingConfig withTriggerConfigs(Map<String,AutoScalingConfig.TriggerConfig> configs)
configs
- new trigger configurationspublic AutoScalingConfig withTriggerConfig(AutoScalingConfig.TriggerConfig config)
config
- new trigger configurationpublic AutoScalingConfig withoutTriggerConfig(String name)
name
- trigger configuration namepublic AutoScalingConfig withTriggerListenerConfigs(Map<String,AutoScalingConfig.TriggerListenerConfig> configs)
configs
- new trigger listener configurationspublic AutoScalingConfig withTriggerListenerConfig(AutoScalingConfig.TriggerListenerConfig config)
config
- new trigger listener configurationpublic AutoScalingConfig withoutTriggerListenerConfig(String name)
name
- trigger listener configuration namepublic int getZkVersion()
public void writeMap(MapWriter.EntryWriter ew) throws IOException
writeMap
in interface MapWriter
IOException
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.