isEnabled -> enabled

This commit is contained in:
Mic 2013-03-15 16:36:26 +08:00
parent d58d6176a2
commit fa1e1a8f86

View file

@ -36,7 +36,7 @@ import org.springframework.util.StopWatch;
@Aspect @Aspect
public class CallMonitoringAspect { public class CallMonitoringAspect {
private boolean isEnabled = true; private boolean enabled = true;
private int callCount = 0; private int callCount = 0;
@ -45,12 +45,12 @@ public class CallMonitoringAspect {
@ManagedAttribute @ManagedAttribute
public void setEnabled(boolean enabled) { public void setEnabled(boolean enabled) {
isEnabled = enabled; this.enabled = enabled;
} }
@ManagedAttribute @ManagedAttribute
public boolean isEnabled() { public boolean isEnabled() {
return isEnabled; return enabled;
} }
@ManagedOperation @ManagedOperation
@ -72,7 +72,7 @@ public class CallMonitoringAspect {
@Around("within(@org.springframework.stereotype.Repository *)") @Around("within(@org.springframework.stereotype.Repository *)")
public Object invoke(ProceedingJoinPoint joinPoint) throws Throwable { public Object invoke(ProceedingJoinPoint joinPoint) throws Throwable {
if (this.isEnabled) { if (this.enabled) {
StopWatch sw = new StopWatch(joinPoint.toShortString()); StopWatch sw = new StopWatch(joinPoint.toShortString());
sw.start("invoke"); sw.start("invoke");