Skip to content

Commit

Permalink
Invoke metrics with jmx in NettyRPC by tangjie
Browse files Browse the repository at this point in the history
Invoke metrics with jmx in NettyRPC by tangjie
  • Loading branch information
tang-jie committed Oct 13, 2017
1 parent b46a90f commit 76471fe
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Binary file removed docs/ojdbc6.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public AbstractInvokeEventBus(String moduleName, String methodName) {

public abstract Notification buildNotification(Object oldValue, Object newValue);

public void nofity(Object oldValue, Object newValue) {
public void notify(Object oldValue, Object newValue) {
Notification notification = buildNotification(oldValue, newValue);
handler.sendNotification(notification);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public void setError(Throwable error) {
@Override
public void update(Observable o, Object arg) {
if ((AbstractInvokeEventBus.ModuleEvent) arg == AbstractInvokeEventBus.ModuleEvent.INVOKE_FAIL_EVENT) {
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_FAIL_EVENT).nofity(super.getVisitor().getInvokeFailCount(), super.getVisitor().incrementInvokeFailCount());
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_FAIL_STACKTRACE_EVENT).nofity(null, error);
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_FAIL_EVENT).notify(super.getVisitor().getInvokeFailCount(), super.getVisitor().incrementInvokeFailCount());
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_FAIL_STACKTRACE_EVENT).notify(null, error);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public InvokeFilterObserver(InvokeEventBusFacade facade, ModuleMetricsVisitor vi
@Override
public void update(Observable o, Object arg) {
if ((AbstractInvokeEventBus.ModuleEvent) arg == AbstractInvokeEventBus.ModuleEvent.INVOKE_FILTER_EVENT) {
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_FILTER_EVENT).nofity(super.getVisitor().getInvokeFilterCount(), super.getVisitor().incrementInvokeFilterCount());
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_FILTER_EVENT).notify(super.getVisitor().getInvokeFilterCount(), super.getVisitor().incrementInvokeFilterCount());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public InvokeObserver(InvokeEventBusFacade facade, ModuleMetricsVisitor visitor)
@Override
public void update(Observable o, Object arg) {
if ((AbstractInvokeEventBus.ModuleEvent) arg == AbstractInvokeEventBus.ModuleEvent.INVOKE_EVENT) {
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_EVENT).nofity(super.getVisitor().getInvokeCount(), super.getVisitor().incrementInvokeCount());
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_EVENT).notify(super.getVisitor().getInvokeCount(), super.getVisitor().incrementInvokeCount());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ public void setInvokeTimespan(long invokeTimespan) {
@Override
public void update(Observable o, Object arg) {
if ((AbstractInvokeEventBus.ModuleEvent) arg == AbstractInvokeEventBus.ModuleEvent.INVOKE_SUCC_EVENT) {
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_SUCC_EVENT).nofity(super.getVisitor().getInvokeSuccCount(), super.getVisitor().incrementInvokeSuccCount());
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_TIMESPAN_EVENT).nofity(super.getVisitor().getInvokeTimespan(), invokeTimespan);
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_MAX_TIMESPAN_EVENT).nofity(super.getVisitor().getInvokeMaxTimespan(), invokeTimespan);
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_MIN_TIMESPAN_EVENT).nofity(super.getVisitor().getInvokeMinTimespan(), invokeTimespan);
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_SUCC_EVENT).notify(super.getVisitor().getInvokeSuccCount(), super.getVisitor().incrementInvokeSuccCount());
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_TIMESPAN_EVENT).notify(super.getVisitor().getInvokeTimespan(), invokeTimespan);
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_MAX_TIMESPAN_EVENT).notify(super.getVisitor().getInvokeMaxTimespan(), invokeTimespan);
super.getFacade().fetchEvent(AbstractInvokeEventBus.ModuleEvent.INVOKE_MIN_TIMESPAN_EVENT).notify(super.getVisitor().getInvokeMinTimespan(), invokeTimespan);
}
}
}

0 comments on commit 76471fe

Please sign in to comment.