use of com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation in project pinpoint by naver.
the class ThreadLocalScopePool method getScope.
@Override
public InterceptorScopeInvocation getScope(InterceptorScopeDefinition scopeDefinition) {
if (scopeDefinition == null) {
throw new NullPointerException("scopeDefinition must not be null");
}
final InterceptorScopeInvocation scope = this.pool.get(scopeDefinition);
if (scope != null) {
return scope;
}
final InterceptorScopeInvocation newScope = createScope(scopeDefinition);
final InterceptorScopeInvocation exist = this.pool.putIfAbsent(scopeDefinition, newScope);
if (exist != null) {
return exist;
}
return newScope;
}
use of com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation in project pinpoint by naver.
the class DefaultScopeTest method testRemoveAttachmentFail.
@Test(expected = IllegalStateException.class)
public void testRemoveAttachmentFail() {
InterceptorScopeInvocation transaction = new DefaultInterceptorScopeInvocation("test");
transaction.removeAttachment();
}
use of com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation in project pinpoint by naver.
the class DefaultScopeTest method testAfterWithoutBefore2.
@Test(expected = IllegalStateException.class)
public void testAfterWithoutBefore2() {
InterceptorScopeInvocation transaction = new DefaultInterceptorScopeInvocation("test");
transaction.leave(ExecutionPolicy.BOUNDARY);
}
use of com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation in project pinpoint by naver.
the class DefaultScopeTest method testAfterWithoutBefore.
@Test(expected = IllegalStateException.class)
public void testAfterWithoutBefore() {
InterceptorScopeInvocation transaction = new DefaultInterceptorScopeInvocation("test");
transaction.leave(ExecutionPolicy.ALWAYS);
}
use of com.navercorp.pinpoint.bootstrap.interceptor.scope.InterceptorScopeInvocation in project pinpoint by naver.
the class DefaultScopeTest method testGetAttachmentFail.
@Test(expected = IllegalStateException.class)
public void testGetAttachmentFail() {
InterceptorScopeInvocation transaction = new DefaultInterceptorScopeInvocation("test");
transaction.getAttachment();
}
Aggregations