Search in sources :

Example 1 with TCommandType

use of com.navercorp.pinpoint.thrift.io.TCommandType in project pinpoint by naver.

the class DefaultProfilerCommandServiceLocator method getCommandServiceCodes.

@Override
public Set<Short> getCommandServiceCodes() {
    Set<Short> commandServiceCodes = new HashSet<Short>(profilerCommandServiceRepository.size());
    Set<Class<? extends TBase>> clazzSet = profilerCommandServiceRepository.keySet();
    for (Class<? extends TBase> clazz : clazzSet) {
        TCommandType commandType = TCommandType.getType(clazz);
        if (commandType != null) {
            commandServiceCodes.add(commandType.getCode());
        }
    }
    return commandServiceCodes;
}
Also used : TBase(org.apache.thrift.TBase) TCommandType(com.navercorp.pinpoint.thrift.io.TCommandType) HashSet(java.util.HashSet)

Example 2 with TCommandType

use of com.navercorp.pinpoint.thrift.io.TCommandType in project pinpoint by naver.

the class TCommandTypeVersionTest method versionTest2.

@Test
public void versionTest2() {
    TCommandTypeVersion version = TCommandTypeVersion.UNKNOWN;
    List<TCommandType> supportTypeList = version.getSupportCommandList();
    Assert.assertEquals(0, supportTypeList.size());
}
Also used : TCommandTypeVersion(com.navercorp.pinpoint.thrift.io.TCommandTypeVersion) TCommandType(com.navercorp.pinpoint.thrift.io.TCommandType) Test(org.junit.Test)

Example 3 with TCommandType

use of com.navercorp.pinpoint.thrift.io.TCommandType in project pinpoint by naver.

the class TCommandTypeVersionTest method versionTest1.

@Test
public void versionTest1() {
    TCommandTypeVersion version = TCommandTypeVersion.V_1_0_2_SNAPSHOT;
    List<TCommandType> supportTypeList = version.getSupportCommandList();
    Assert.assertEquals(2, supportTypeList.size());
    Assert.assertTrue(supportTypeList.contains(TCommandType.THREAD_DUMP));
    Assert.assertTrue(supportTypeList.contains(TCommandType.RESULT));
}
Also used : TCommandTypeVersion(com.navercorp.pinpoint.thrift.io.TCommandTypeVersion) TCommandType(com.navercorp.pinpoint.thrift.io.TCommandType) Test(org.junit.Test)

Aggregations

TCommandType (com.navercorp.pinpoint.thrift.io.TCommandType)3 TCommandTypeVersion (com.navercorp.pinpoint.thrift.io.TCommandTypeVersion)2 Test (org.junit.Test)2 HashSet (java.util.HashSet)1 TBase (org.apache.thrift.TBase)1