You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by dl...@apache.org on 2016/04/26 22:00:49 UTC
incubator-quarks-website git commit: PeriodicMXBean -> PeriodMXBean
Repository: incubator-quarks-website
Updated Branches:
refs/heads/master 394ccb7ae -> 82425f50d
PeriodicMXBean -> PeriodMXBean
Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/commit/82425f50
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/tree/82425f50
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/diff/82425f50
Branch: refs/heads/master
Commit: 82425f50da3225d9e614e3caff79ba34261c9075
Parents: 394ccb7
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Tue Apr 26 15:59:32 2016 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Tue Apr 26 15:59:32 2016 -0400
----------------------------------------------------------------------
site/recipes/recipe_adaptable_polling_source.md | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-quarks-website/blob/82425f50/site/recipes/recipe_adaptable_polling_source.md
----------------------------------------------------------------------
diff --git a/site/recipes/recipe_adaptable_polling_source.md b/site/recipes/recipe_adaptable_polling_source.md
index b1323a3..1a6deac 100644
--- a/site/recipes/recipe_adaptable_polling_source.md
+++ b/site/recipes/recipe_adaptable_polling_source.md
@@ -12,7 +12,7 @@ The ``Topology.poll()`` documentation describes how the poll period may be chang
The mechanism is based on a more general Quarks runtime ``quarks.execution.services.ControlService`` service. The runtime registers "control beans" for entities that are controllable. These controls can be retrieved at runtime via the service.
-At runtime, ``Topology.poll()`` registers a ``quarks.execution.mbeans.PeriodicMXBean`` control. __Retrieving the control at runtime requires setting an alias on the poll generated stream using ``TStream.alias()``.__
+At runtime, ``Topology.poll()`` registers a ``quarks.execution.mbeans.PeriodMXBean`` control. __Retrieving the control at runtime requires setting an alias on the poll generated stream using ``TStream.alias()``.__
## Create the polled stream and set its alias
@@ -34,8 +34,8 @@ It's also a good practice to add tags to streams to improve the usability of the
ControlService cs = pollStream.topology().getRuntimeServiceSupplier()
.get().getService(ControlService.class);
- // using the the stream's alias, get its PeriodicMXBean control
- PeriodicMXBean control = cs.getControl("periodic", pollStream.getAlias(), PeriodicMXBean.class);
+ // using the the stream's alias, get its PeriodMXBean control
+ PeriodMXBean control = cs.getControl(TStream.TYPE, pollStream.getAlias(), PeriodMXBean.class);
// change the poll period using the control
System.out.println("Setting period="+period+" "+unit+" stream="+pollStream);
@@ -62,7 +62,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import com.google.gson.JsonObject;
-import quarks.execution.mbeans.PeriodicMXBean;
+import quarks.execution.mbeans.PeriodMXBean;
import quarks.execution.services.ControlService;
import quarks.providers.development.DevelopmentProvider;
import quarks.providers.direct.DirectProvider;
@@ -110,8 +110,8 @@ public class AdaptablePolledSource {
ControlService cs = pollStream.topology().getRuntimeServiceSupplier()
.get().getService(ControlService.class);
- // using the the stream's alias, get its PeriodicMXBean control
- PeriodicMXBean control = cs.getControl("periodic", pollStream.getAlias(), PeriodicMXBean.class);
+ // using the the stream's alias, get its PeriodMXBean control
+ PeriodMXBean control = cs.getControl(TStream.TYPE, pollStream.getAlias(), PeriodMXBean.class);
// change the poll period using the control
System.out.println("Setting period="+period+" "+unit+" stream="+pollStream);