Github user drigodwin commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/160#discussion_r109780375
--- Diff: guide/java/policies.md ---
@@ -121,151 +120,79 @@ The ConditionalSuspendPolicy will suspend and resume
a target policy based on co
The LoadBalancingPolicy 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.
-### Enrichers
-
-#### Transformer
-
-- org.apache.brooklyn.enricher.stock.Transformer
-
-Transforms attributes of an entity.
-
-{% highlight yaml %}
-brooklyn.enrichers:
-- type: org.apache.brooklyn.enricher.stock.Transformer
- brooklyn.config:
- enricher.sourceSensor: $brooklyn:sensor("urls.tcp.string")
- enricher.targetSensor: $brooklyn:sensor("urls.tcp.withBrackets")
- enricher.targetValue: $brooklyn:formatString("[%s]",
$brooklyn:attributeWhenReady("urls.tcp.string"))
-{% endhighlight %}
-
-#### Propagator
-
-- org.apache.brooklyn.enricher.stock.Propagator
-
-Use propagator to duplicate one sensor as another, giving the supplied
sensor mapping.
-The other use of Propagator is where you specify a producer (using
`$brooklyn:entity(...)` as below)
-from which to take sensors; in that mode you can specify `propagate` as a
list of sensors whose names are unchanged,
-instead of (or in addition to) this map
-{% highlight yaml %}
-brooklyn.enrichers:
-- type: org.apache.brooklyn.enricher.stock.Propagator
- brooklyn.config:
- producer: $brooklyn:entity("cluster")
-- type: org.apache.brooklyn.enricher.stock.Propagator
- brooklyn.config:
- sensorMapping:
- $brooklyn:sensor("url"):
$brooklyn:sensor("org.apache.brooklyn.core.entity.Attributes", "main.uri")
-{% endhighlight %}
-
-#### Custom Aggregating
-
-- org.apache.brooklyn.enricher.stock.Aggregator
-
-Aggregates multiple sensor values (usually across a tier, esp. a cluster)
and performs a supplied aggregation method to them to return an aggregate
figure, e.g. sum, mean, median, etc.
-
-{% highlight yaml %}
-brooklyn.enrichers:
-- type: org.apache.brooklyn.enricher.stock.Aggregator
- brooklyn.config:
- enricher.sourceSensor: $brooklyn:sensor("webapp.reqs.perSec.windowed")
- enricher.targetSensor: $brooklyn:sensor("webapp.reqs.perSec.perNode")
- enricher.aggregating.fromMembers: true
- transformation: average
-{% endhighlight %}
+Writing a Policy
+----------------
-#### Joiner
+### Your First Policy
-- org.apache.brooklyn.enricher.stock.Joiner
-
-Joins a sensor whose output is a list into a single item joined by a
separator.
-
-{% highlight yaml %}
-brooklyn.enrichers:
-- type: org.apache.brooklyn.enricher.stock.Joiner
- brooklyn.config:
- enricher.sourceSensor: $brooklyn:sensor("urls.tcp.list")
- enricher.targetSensor: $brooklyn:sensor("urls.tcp.string")
- uniqueTag: urls.quoted.string
+Policies perform the active management enabled by Brooklyn.
+Each policy instance is associated with an entity,
+and at runtime it will typically subscribe to sensors on that entity or
children,
+performing some computation and optionally actions when a subscribed
sensor event occurs.
+This action might be invoking an effector or emitting a new sensor,
+depending the desired behavior is.
+
+Writing a policy is straightforward.
+Simply extend ``AbstractPolicy``,
--- End diff --
Should this and below have double backticks?
---
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.
---