mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-17 16:56:15 +10:00
#119 code clean-up
- findbug, pmd, klocwork normal Priority - fix UnusedModifier
This commit is contained in:
+25
-24
@@ -1,10 +1,10 @@
|
||||
package com.navercorp.pinpoint.bootstrap.instrument;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.Interceptor;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.tracevalue.TraceValue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author emeroad
|
||||
* @author netspider
|
||||
@@ -40,16 +40,17 @@ public interface InstrumentClass {
|
||||
int reuseInterceptor(String methodName, String[] args, int interceptorId, Type type) throws InstrumentException, NotFoundInstrumentException;
|
||||
|
||||
|
||||
int addInterceptor(String methodName, String[] args, Interceptor interceptor) throws InstrumentException, NotFoundInstrumentException;
|
||||
int addInterceptor(String methodName, String[] args, Interceptor interceptor) throws InstrumentException, NotFoundInstrumentException;
|
||||
|
||||
int addScopeInterceptor(String methodName, String[] args, Interceptor interceptor, String scopeName) throws InstrumentException, NotFoundInstrumentException;
|
||||
|
||||
int addScopeInterceptor(String methodName, String[] args, Interceptor interceptor, Scope scope) throws InstrumentException, NotFoundInstrumentException;
|
||||
|
||||
int addScopeInterceptorIfDeclared(String methodName, String[] args, Interceptor interceptor, String scopeName) throws InstrumentException;
|
||||
|
||||
/**
|
||||
* methodName, args가 일치하는 메소드가 클래스에 구현되어있는 경우에만 scope interceptor를 적용합니다.
|
||||
*
|
||||
*
|
||||
* @param methodName
|
||||
* @param args
|
||||
* @param interceptor
|
||||
@@ -63,17 +64,17 @@ public interface InstrumentClass {
|
||||
|
||||
int addInterceptorCallByContextClassLoader(String methodName, String[] args, Interceptor interceptor) throws InstrumentException, NotFoundInstrumentException;
|
||||
|
||||
int addInterceptorCallByContextClassLoader(String methodName, String[] args, Interceptor interceptor, Type type) throws InstrumentException, NotFoundInstrumentException;
|
||||
int addInterceptorCallByContextClassLoader(String methodName, String[] args, Interceptor interceptor, Type type) throws InstrumentException, NotFoundInstrumentException;
|
||||
|
||||
void weaving(String adviceClassName) throws InstrumentException;
|
||||
void weaving(String adviceClassName) throws InstrumentException;
|
||||
|
||||
boolean addDebugLogBeforeAfterMethod();
|
||||
boolean addDebugLogBeforeAfterMethod();
|
||||
|
||||
boolean addDebugLogBeforeAfterConstructor();
|
||||
boolean addDebugLogBeforeAfterConstructor();
|
||||
|
||||
byte[] toBytecode() throws InstrumentException ;
|
||||
byte[] toBytecode() throws InstrumentException;
|
||||
|
||||
Class<?> toClass() throws InstrumentException;
|
||||
Class<?> toClass() throws InstrumentException;
|
||||
|
||||
/**
|
||||
* 대신 addTraceValue 를 사용하라.
|
||||
@@ -85,27 +86,27 @@ public interface InstrumentClass {
|
||||
* 대신 addTraceValue 를 사용하라.
|
||||
*/
|
||||
@Deprecated
|
||||
void addTraceVariable(String variableName, String setterName, String getterName, String variableType) throws InstrumentException;
|
||||
void addTraceVariable(String variableName, String setterName, String getterName, String variableType) throws InstrumentException;
|
||||
|
||||
void addTraceValue(Class<? extends TraceValue> traceValue, String initValue) throws InstrumentException;
|
||||
|
||||
void addTraceValue(Class<? extends TraceValue> traceValue) throws InstrumentException;
|
||||
|
||||
boolean insertCodeAfterConstructor(String[] args, String code);
|
||||
|
||||
boolean insertCodeBeforeConstructor(String[] args, String code);
|
||||
boolean insertCodeAfterConstructor(String[] args, String code);
|
||||
|
||||
boolean insertCodeBeforeConstructor(String[] args, String code);
|
||||
|
||||
List<MethodInfo> getDeclaredMethods();
|
||||
|
||||
List<MethodInfo> getDeclaredMethods(MethodFilter methodFilter);
|
||||
|
||||
MethodInfo getDeclaredMethod(String name, String[] parameterTypes);
|
||||
|
||||
MethodInfo getConstructor(String[] parameterTypes);
|
||||
|
||||
public boolean isInterceptable();
|
||||
|
||||
boolean hasDeclaredMethod(String methodName, String[] args);
|
||||
|
||||
List<MethodInfo> getDeclaredMethods(MethodFilter methodFilter);
|
||||
|
||||
MethodInfo getDeclaredMethod(String name, String[] parameterTypes);
|
||||
|
||||
MethodInfo getConstructor(String[] parameterTypes);
|
||||
|
||||
boolean isInterceptable();
|
||||
|
||||
boolean hasDeclaredMethod(String methodName, String[] args);
|
||||
|
||||
boolean hasMethod(String methodName, String[] parameterTypeArray, String returnType);
|
||||
|
||||
|
||||
@@ -6,13 +6,13 @@ import com.navercorp.pinpoint.bootstrap.interceptor.MethodDescriptor;
|
||||
* @author emeroad
|
||||
*/
|
||||
public interface MethodInfo {
|
||||
public String getName();
|
||||
String getName();
|
||||
|
||||
public String[] getParameterTypes();
|
||||
String[] getParameterTypes();
|
||||
|
||||
public int getModifiers();
|
||||
int getModifiers();
|
||||
|
||||
public boolean isConstructor();
|
||||
boolean isConstructor();
|
||||
|
||||
public MethodDescriptor getDescriptor();
|
||||
MethodDescriptor getDescriptor();
|
||||
}
|
||||
|
||||
@@ -36,87 +36,87 @@ public interface PLogger {
|
||||
|
||||
|
||||
|
||||
public boolean isDebugEnabled();
|
||||
boolean isDebugEnabled();
|
||||
|
||||
|
||||
|
||||
public void debug(String msg);
|
||||
void debug(String msg);
|
||||
|
||||
|
||||
|
||||
public void debug(String format, Object arg);
|
||||
void debug(String format, Object arg);
|
||||
|
||||
|
||||
|
||||
|
||||
public void debug(String format, Object arg1, Object arg2);
|
||||
void debug(String format, Object arg1, Object arg2);
|
||||
|
||||
|
||||
public void debug(String format, Object[] argArray);
|
||||
void debug(String format, Object[] argArray);
|
||||
|
||||
|
||||
public void debug(String msg, Throwable t);
|
||||
void debug(String msg, Throwable t);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public boolean isInfoEnabled();
|
||||
boolean isInfoEnabled();
|
||||
|
||||
|
||||
public void info(String msg);
|
||||
void info(String msg);
|
||||
|
||||
|
||||
|
||||
public void info(String format, Object arg);
|
||||
void info(String format, Object arg);
|
||||
|
||||
|
||||
|
||||
public void info(String format, Object arg1, Object arg2);
|
||||
void info(String format, Object arg1, Object arg2);
|
||||
|
||||
|
||||
public void info(String format, Object[] argArray);
|
||||
void info(String format, Object[] argArray);
|
||||
|
||||
|
||||
public void info(String msg, Throwable t);
|
||||
void info(String msg, Throwable t);
|
||||
|
||||
|
||||
|
||||
public boolean isWarnEnabled();
|
||||
boolean isWarnEnabled();
|
||||
|
||||
|
||||
public void warn(String msg);
|
||||
void warn(String msg);
|
||||
|
||||
|
||||
public void warn(String format, Object arg);
|
||||
void warn(String format, Object arg);
|
||||
|
||||
|
||||
public void warn(String format, Object[] argArray);
|
||||
void warn(String format, Object[] argArray);
|
||||
|
||||
|
||||
public void warn(String format, Object arg1, Object arg2);
|
||||
void warn(String format, Object arg1, Object arg2);
|
||||
|
||||
|
||||
public void warn(String msg, Throwable t);
|
||||
void warn(String msg, Throwable t);
|
||||
|
||||
|
||||
|
||||
public boolean isErrorEnabled();
|
||||
boolean isErrorEnabled();
|
||||
|
||||
|
||||
public void error(String msg);
|
||||
void error(String msg);
|
||||
|
||||
|
||||
public void error(String format, Object arg);
|
||||
void error(String format, Object arg);
|
||||
|
||||
|
||||
public void error(String format, Object arg1, Object arg2);
|
||||
void error(String format, Object arg1, Object arg2);
|
||||
|
||||
|
||||
public void error(String format, Object[] argArray);
|
||||
void error(String format, Object[] argArray);
|
||||
|
||||
|
||||
public void error(String msg, Throwable t);
|
||||
void error(String msg, Throwable t);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@ package com.navercorp.pinpoint.bootstrap.plugin;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
|
||||
public interface ClassEditor {
|
||||
public byte[] edit(ClassLoader classLoader, InstrumentClass target);
|
||||
byte[] edit(ClassLoader classLoader, InstrumentClass target);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package com.navercorp.pinpoint.bootstrap.plugin;
|
||||
|
||||
public interface ClassEditorFactory {
|
||||
public ClassEditor get(ProfilerPluginContext context);
|
||||
ClassEditor get(ProfilerPluginContext context);
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@ package com.navercorp.pinpoint.bootstrap.plugin;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
|
||||
public interface Condition {
|
||||
public boolean check(InstrumentClass target);
|
||||
boolean check(InstrumentClass target);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package com.navercorp.pinpoint.bootstrap.plugin;
|
||||
|
||||
public interface DedicatedClassEditor extends ClassEditor {
|
||||
public String getTargetClassName();
|
||||
String getTargetClassName();
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,5 +5,5 @@ import com.navercorp.pinpoint.bootstrap.instrument.MethodInfo;
|
||||
import com.navercorp.pinpoint.bootstrap.interceptor.Interceptor;
|
||||
|
||||
public interface InterceptorFactory {
|
||||
public Interceptor getInterceptor(ClassLoader classLoader, InstrumentClass target, MethodInfo targetMethod);
|
||||
Interceptor getInterceptor(ClassLoader classLoader, InstrumentClass target, MethodInfo targetMethod);
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,5 +4,5 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
|
||||
public interface InterceptorInjector {
|
||||
public void inject(ClassLoader classLoader, InstrumentClass target) throws InstrumentException;
|
||||
void inject(ClassLoader classLoader, InstrumentClass target) throws InstrumentException;
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,11 +3,11 @@ package com.navercorp.pinpoint.bootstrap.plugin;
|
||||
public interface MetadataInitializationStrategy {
|
||||
public static final class ByConstructor implements MetadataInitializationStrategy {
|
||||
private final String className;
|
||||
|
||||
|
||||
public ByConstructor(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,5 +4,5 @@ import com.navercorp.pinpoint.bootstrap.instrument.InstrumentClass;
|
||||
import com.navercorp.pinpoint.bootstrap.instrument.InstrumentException;
|
||||
|
||||
public interface MetadataInjector {
|
||||
public void inject(ClassLoader classLoader, InstrumentClass target) throws InstrumentException;
|
||||
void inject(ClassLoader classLoader, InstrumentClass target) throws InstrumentException;
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@ package com.navercorp.pinpoint.bootstrap.plugin;
|
||||
import java.util.List;
|
||||
|
||||
public interface ProfilerPlugin {
|
||||
public List<ClassEditor> getClassEditors(ProfilerPluginContext context);
|
||||
List<ClassEditor> getClassEditors(ProfilerPluginContext context);
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ import com.navercorp.pinpoint.thrift.dto.TAgentInfo;
|
||||
* @author emeroad
|
||||
*/
|
||||
public interface ApplicationIndexDao {
|
||||
public void insert(final TAgentInfo agentInfo);
|
||||
void insert(final TAgentInfo agentInfo);
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,5 +7,5 @@ import org.apache.thrift.TBase;
|
||||
*/
|
||||
public interface ThriftBoMapper<T, F extends TBase<?,?>> {
|
||||
|
||||
public T map(F thriftObject);
|
||||
T map(F thriftObject);
|
||||
}
|
||||
|
||||
@@ -4,5 +4,5 @@ package com.navercorp.pinpoint.common.util;
|
||||
* @author emeroad
|
||||
*/
|
||||
public interface TimeSlot {
|
||||
public long getTimeSlot(long time);
|
||||
long getTimeSlot(long time);
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,5 +15,5 @@ import com.navercorp.pinpoint.bootstrap.plugin.ProfilerPlugin;
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ModifierProvider {
|
||||
public List<Modifier> getModifiers(ByteCodeInstrumentor byteCodeInstrumentor, Agent agent);
|
||||
List<Modifier> getModifiers(ByteCodeInstrumentor byteCodeInstrumentor, Agent agent);
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,5 +4,5 @@ package com.navercorp.pinpoint.profiler.monitor.metric;
|
||||
* @author emeroad
|
||||
*/
|
||||
public interface AcceptHistogram {
|
||||
public boolean addResponseTime(String parentApplicationName, short serviceType, int millis);
|
||||
boolean addResponseTime(String parentApplicationName, short serviceType, int millis);
|
||||
}
|
||||
|
||||
@@ -8,21 +8,21 @@ import com.navercorp.pinpoint.web.alarm.vo.Rule;
|
||||
|
||||
public interface AlarmResourceDao {
|
||||
|
||||
public List<Rule> selectAppRule(String applicationName);
|
||||
List<Rule> selectAppRule(String applicationName);
|
||||
|
||||
public void insertAppRule(List<Rule> rules);
|
||||
void insertAppRule(List<Rule> rules);
|
||||
|
||||
public void deleteAppRule(String applicationName);
|
||||
void deleteAppRule(String applicationName);
|
||||
|
||||
public List<String> selectEmpGroupPhoneNumber(String empGroup);
|
||||
List<String> selectEmpGroupPhoneNumber(String empGroup);
|
||||
|
||||
public List<String> selectEmpGroupEmail(String empGroup);
|
||||
List<String> selectEmpGroupEmail(String empGroup);
|
||||
|
||||
public List<String> selectEmpGroupName();
|
||||
List<String> selectEmpGroupName();
|
||||
|
||||
public List<AlarmEmp> selectEmpGroupMember(String alarmGroup);
|
||||
List<AlarmEmp> selectEmpGroupMember(String alarmGroup);
|
||||
|
||||
public void insertEmpGroupMember(List<AlarmEmp> emps);
|
||||
void insertEmpGroupMember(List<AlarmEmp> emps);
|
||||
|
||||
public void deleteEmpGroupMember(String groupName);
|
||||
void deleteEmpGroupMember(String groupName);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@ import com.navercorp.pinpoint.web.vo.Application;
|
||||
*/
|
||||
public interface CommonService {
|
||||
|
||||
public List<Application> selectAllApplicationNames();
|
||||
List<Application> selectAllApplicationNames();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
package com.navercorp.pinpoint.web.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.navercorp.pinpoint.web.applicationmap.ApplicationMap;
|
||||
import com.navercorp.pinpoint.web.filter.Filter;
|
||||
import com.navercorp.pinpoint.web.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author netspider
|
||||
* @author emeroad
|
||||
*/
|
||||
public interface FilteredMapService {
|
||||
|
||||
public LimitedScanResult<List<TransactionId>> selectTraceIdsFromApplicationTraceIndex(String applicationName, Range range, int limit);
|
||||
|
||||
public LimitedScanResult<List<TransactionId>> selectTraceIdsFromApplicationTraceIndex(String applicationName, SelectedScatterArea area, int limit);
|
||||
LimitedScanResult<List<TransactionId>> selectTraceIdsFromApplicationTraceIndex(String applicationName, Range range, int limit);
|
||||
|
||||
public LoadFactor linkStatistics(Range range, List<TransactionId> traceIdSet, Application sourceApplication, Application destinationApplication, Filter filter);
|
||||
LimitedScanResult<List<TransactionId>> selectTraceIdsFromApplicationTraceIndex(String applicationName, SelectedScatterArea area, int limit);
|
||||
|
||||
public ApplicationMap selectApplicationMap(List<TransactionId> traceIdList, Range originalRange, Range scanRange, Filter filter);
|
||||
LoadFactor linkStatistics(Range range, List<TransactionId> traceIdSet, Application sourceApplication, Application destinationApplication, Filter filter);
|
||||
|
||||
public ApplicationMap selectApplicationMap(TransactionId transactionId);
|
||||
ApplicationMap selectApplicationMap(List<TransactionId> traceIdList, Range originalRange, Range scanRange, Filter filter);
|
||||
|
||||
ApplicationMap selectApplicationMap(TransactionId transactionId);
|
||||
}
|
||||
|
||||
@@ -9,15 +9,15 @@ import com.navercorp.pinpoint.web.vo.Range;
|
||||
* @author netspider
|
||||
*/
|
||||
public interface MapService {
|
||||
/**
|
||||
* 메인 화면의 서버 맵 조회.
|
||||
*
|
||||
* @param sourceApplication
|
||||
* @param range
|
||||
* @return
|
||||
*/
|
||||
public ApplicationMap selectApplicationMap(Application sourceApplication, Range range);
|
||||
/**
|
||||
* 메인 화면의 서버 맵 조회.
|
||||
*
|
||||
* @param sourceApplication
|
||||
* @param range
|
||||
* @return
|
||||
*/
|
||||
ApplicationMap selectApplicationMap(Application sourceApplication, Range range);
|
||||
|
||||
@Deprecated
|
||||
public NodeHistogram linkStatistics(Application sourceApplication, Application destinationApplication, Range range);
|
||||
NodeHistogram linkStatistics(Application sourceApplication, Application destinationApplication, Range range);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package com.navercorp.pinpoint.web.service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.navercorp.pinpoint.common.bo.SpanBo;
|
||||
import com.navercorp.pinpoint.web.filter.Filter;
|
||||
import com.navercorp.pinpoint.web.vo.Range;
|
||||
@@ -11,49 +8,50 @@ import com.navercorp.pinpoint.web.vo.TransactionId;
|
||||
import com.navercorp.pinpoint.web.vo.TransactionMetadataQuery;
|
||||
import com.navercorp.pinpoint.web.vo.scatter.Dot;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface ScatterChartService {
|
||||
|
||||
/**
|
||||
* 필터를 사용한 검색.
|
||||
*
|
||||
* @param traceIds
|
||||
* @param applicationName
|
||||
* @param filter
|
||||
* @return
|
||||
*/
|
||||
public List<Dot> selectScatterData(Collection<TransactionId> traceIds, String applicationName, Filter filter);
|
||||
/**
|
||||
* 필터를 사용한 검색.
|
||||
*
|
||||
* @param traceIds
|
||||
* @param applicationName
|
||||
* @param filter
|
||||
* @return
|
||||
*/
|
||||
List<Dot> selectScatterData(Collection<TransactionId> traceIds, String applicationName, Filter filter);
|
||||
|
||||
/**
|
||||
* 전체 데이터 검색.
|
||||
*
|
||||
* @param applicationName
|
||||
* @param range
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
public List<Dot> selectScatterData(String applicationName, Range range, int limit);
|
||||
/**
|
||||
* 전체 데이터 검색.
|
||||
*
|
||||
* @param applicationName
|
||||
* @param range
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
List<Dot> selectScatterData(String applicationName, Range range, int limit);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param applicationName
|
||||
* @param area
|
||||
* @param offsetTransactionId
|
||||
* @param offsetTransactionElapsed
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
public List<Dot> selectScatterData(String applicationName, SelectedScatterArea area, TransactionId offsetTransactionId, int offsetTransactionElapsed, int limit);
|
||||
|
||||
/**
|
||||
* scatter dot을 limit 개수만큼 잘라서 조회하기 위해서 사용된다.
|
||||
*
|
||||
* @param applicationName
|
||||
* @param from
|
||||
* @param to
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
// public List<TransactionId> selectScatterTraceIdList(String applicationName, long from, long to, int limit);
|
||||
/**
|
||||
* @param applicationName
|
||||
* @param area
|
||||
* @param offsetTransactionId
|
||||
* @param offsetTransactionElapsed
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
List<Dot> selectScatterData(String applicationName, SelectedScatterArea area, TransactionId offsetTransactionId, int offsetTransactionElapsed, int limit);
|
||||
|
||||
public List<SpanBo> selectTransactionMetadata(TransactionMetadataQuery query);
|
||||
/**
|
||||
* scatter dot을 limit 개수만큼 잘라서 조회하기 위해서 사용된다.
|
||||
*
|
||||
* @param applicationName
|
||||
* @param from
|
||||
* @param to
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
// List<TransactionId> selectScatterTraceIdList(String applicationName, long from, long to, int limit);
|
||||
List<SpanBo> selectTransactionMetadata(TransactionMetadataQuery query);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user