Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-docs/pull/90#discussion_r70600629
  
    --- Diff: guide/java/policies.md ---
    @@ -31,42 +31,144 @@ Policies are highly reusable as their inputs, 
thresholds and targets are customi
     
     ### Management Policies
     
    -- AutoScaler Policy
    +#### AutoScaler Policy
        
    -   Increases or decreases the size of a Resizable entity based on an 
aggregate sensor value, the current size of the entity, and customized high/low 
watermarks.
    +Increases or decreases the size of a Resizable entity based on an 
aggregate sensor value, the current size of the entity, and customized high/low 
watermarks.
     
    -   An AutoScaler policy can take any sensor as a metric, have its 
watermarks tuned live, and target any resizable entity - be it an application 
server managing how many instances it handles, or a tier managing global 
capacity.
    +An AutoScaler policy can take any sensor as a metric, have its watermarks 
tuned live, and target any resizable entity - be it an application server 
managing how many instances it handles, or a tier managing global capacity.
     
    -   e.g. if the average request per second across a cluster of Tomcat 
servers goes over the high watermark, it will resize the cluster to bring the 
average back to within the watermarks.
    -  
    -<!---
    -TODO - list some
    -TODO - describe how they can be customised (briefly mention sensors)
    --->
    +e.g. if the average request per second across a cluster of Tomcat servers 
goes over the high watermark, it will resize the cluster to bring the average 
back to within the watermarks.
    +
    +{% highlight yaml %}
    +
    +  - type: org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
    +    brooklyn.config:
    +      metric: webapp.reqs.perSec.perNode
    +      metricUpperBound: 3
    +      metricLowerBound: 1
    +      resizeUpStabilizationDelay: 2s
    +      resizeDownStabilizationDelay: 1m
    +      maxPoolSize: 3
    +
    +{% endhighlight %}
    +
    +#### ServiceReplacer
    +
    +Attaches to a DynamicCluster and replaces a failed member in response to 
HASensors.ENTITY_FAILED or other sensor.  The [introduction to policies](../) 
shows a worked example of the ServiceReplacer policy in user.
    +
    +#### FollowTheSunPolicy
    +
    +Policy for moving work around to follow the demand.  The work can be any 
Movable entity.  This currently available in yaml blueprints.
    +
    +#### ConditionalSuspendPolicy
    +
    +This policy will suspend and resume a target policy based on configured 
suspend and resume sensors.
    +
    +#### CreateUserPolicy
    +
    +Attaches to an Entity and monitors for the addition of a location to that 
entity, the policy then adds a new user to the VM with a randomly generated 
password, with the SSH connection details set on the entity as the 
createuser.vm.user.credentials sensor.
    +
    +#### AdvertiseWinRMLoginPolicy
    +
    +This is similar to the CreateUserPolicy.  It will monitor the addition of 
WinRmMachineLocations to an entity and then create a sensor advertising the 
administrative user's credentials.
    +
    +#### SshMachineFailureDetector
    +
    +HA policy for monitoring an SshMachine, emitting an event if the 
connection is lost/restored.
    +
    +#### ConnectionFailureDetector
    +
    +HA policy for monitoring an http connection, emitting an event if the 
connection is lost/restored.
     
    +#### StopAfterDurationPolicy
    +
    +The StopAfterDurationPolicy can be used to limit the lifetime of an 
entity.  After a configure time period expires the entity will be stopped.
    +
    +#### LoadBalancingPolicy
    +
    +Policy that is attached to a pool of "containers", each of which can host 
one or more migratable "items".  The policy monitors the workrates of the items 
and effects migrations in an attempt to ensure that the containers are all 
sufficiently utilized without any of them being overloaded.
    +
    +#### ServiceRestarter
    +
    +Attaches to a SoftwareProcess (or anything Startable, emitting 
ENTITY_FAILED or other configurable sensor), and invokes restart on failure; if 
there is a subsequent failure within a configurable time interval, or if the 
restart fails, this gives up and emits {@link #ENTITY_RESTART_FAILED}
    +
    +{% highlight yaml %}
    +- type: org.apache.brooklyn.policy.ha.ServiceRestarter
    +  brooklyn.config:
    +    failOnRecurringFailuresInThisDuration: 5m
    +{% endhighlight %}
     
     ###  Enrichers
    --- End diff --
    
    Let's re-order to first say about Transformer, Propagator, Aggregator, 
Joiner, and then the others.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to