public class Context implements Closeable {

    private static final ThreadLocal<Context> CONTEXT_HOLDER = new InheritableThreadLocal<>();

    private NAME_1 namespace;

    private NAME_2 NAME_2;

    private Cache cache;

    private Trace trace;

    private ChatQueue chatQueue;

    public Context() {
    }

    public Context(NAME_1 namespace, NAME_2 NAME_2, Cache cache, Trace trace, ChatQueue chatQueue) {
        this.namespace = namespace;
        this.NAME_2 = NAME_2;
        this.cache = cache;
        this.chatQueue = chatQueue;
        this.trace = trace;
    }

    public void open() {
        CONTEXT_HOLDER.set(this);
    }

    public void close() {
        CONTEXT_HOLDER.remove();
    }

    public static Context currentContext() {
        return CONTEXT_HOLDER.get();
    }

    public NAME_2 NAME_2(){
        return NAME_2;
    }

    public Cache cache() {
        return cache;
    }

    public Trace trace() {
        return trace;
    }

    public ChatQueue chatQueue() {
        return chatQueue;
    }

    public NAME_1 namespace() {
        return namespace;
    }
} Do not include the following keywords: context_holder.set(this, this.chatqueue, threadlocal, class
user