Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Correct javadoc reference
[controller.git]
/
opendaylight
/
md-sal
/
sal-clustering-commons
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
common
/
actor
/
AbstractUntypedActorWithMetering.java
diff --git
a/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedActorWithMetering.java
b/opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedActorWithMetering.java
index 5497f93c4371a2c044bdaf05266e40656b4ff50e..2124b24faf29ac92859b50834c8cbbe654a84bc3 100644
(file)
--- a/
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedActorWithMetering.java
+++ b/
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/AbstractUntypedActorWithMetering.java
@@
-12,13
+12,28
@@
package org.opendaylight.controller.cluster.common.actor;
*/
public abstract class AbstractUntypedActorWithMetering extends AbstractUntypedActor {
*/
public abstract class AbstractUntypedActorWithMetering extends AbstractUntypedActor {
+ //this is used in the metric name. Some transient actors do not have defined names
+ private String actorNameOverride;
+
public AbstractUntypedActorWithMetering() {
public AbstractUntypedActorWithMetering() {
- if (isMetricsCaptureEnabled())
+ if (isMetricsCaptureEnabled()) {
+ getContext().become(new MeteringBehavior(this));
+ }
+ }
+
+ public AbstractUntypedActorWithMetering(String actorNameOverride) {
+ this.actorNameOverride = actorNameOverride;
+ if (isMetricsCaptureEnabled()) {
getContext().become(new MeteringBehavior(this));
getContext().become(new MeteringBehavior(this));
+ }
}
}
- private boolean isMetricsCaptureEnabled(){
+ private boolean isMetricsCaptureEnabled()
{
CommonConfig config = new CommonConfig(getContext().system().settings().config());
return config.isMetricCaptureEnabled();
}
CommonConfig config = new CommonConfig(getContext().system().settings().config());
return config.isMetricCaptureEnabled();
}
+
+ public String getActorNameOverride() {
+ return actorNameOverride;
+ }
}
}