Java Code Examples for com.netflix.hystrix.strategy.concurrency.HystrixRequestContext#close()

The following examples show how to use com.netflix.hystrix.strategy.concurrency.HystrixRequestContext#close() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ClassController.java    From JetfireCloud with Apache License 2.0 5 votes vote down vote up
@GetMapping("/classes")
public Result hello(@RequestParam String name) {
    HystrixRequestContext context = HystrixRequestContext.initializeContext();
    Result users = classService.users(name);
    context.close();
    return users;
}
 
Example 2
Source File: ClassController.java    From JetfireCloud with Apache License 2.0 5 votes vote down vote up
@PostMapping("/classes")
public Result hello(@RequestBody Map<String, String> params) {
    HystrixRequestContext context = HystrixRequestContext.initializeContext();
    Result users = classService.users(params);
    context.close();
    return users;
}
 
Example 3
Source File: HystrixRequestContextServletFilter.java    From SpringAll with MIT License 4 votes vote down vote up
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
    HystrixRequestContext context = HystrixRequestContext.initializeContext();
    filterChain.doFilter(servletRequest, servletResponse);
    context.close();
}
 
Example 4
Source File: HystrixRequestContextServletFilter.java    From SpringAll with MIT License 4 votes vote down vote up
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
    HystrixRequestContext context = HystrixRequestContext.initializeContext();
    filterChain.doFilter(servletRequest, servletResponse);
    context.close();
}
 
Example 5
Source File: HystrixRequestContextServletFilter.java    From SpringAll with MIT License 4 votes vote down vote up
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
    HystrixRequestContext context = HystrixRequestContext.initializeContext();
    filterChain.doFilter(servletRequest, servletResponse);
    context.close();
}