public final class RequestContextThreadLocal extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends RequestContext> |
get()
Returns the current
RequestContext in the thread-local. |
static <T extends RequestContext> |
getAndRemove()
Removes the
RequestContext in the thread-local and returns it. |
static <T extends RequestContext> |
getAndSet(RequestContext ctx)
Sets the specified
RequestContext in the thread-local and returns the old RequestContext. |
static void |
remove()
Removes the current
RequestContext in the thread-local. |
static void |
set(RequestContext ctx)
Sets the specified
RequestContext in the thread-local. |
public static <T extends RequestContext> T get()
RequestContext in the thread-local.public static <T extends RequestContext> T getAndSet(RequestContext ctx)
RequestContext in the thread-local and returns the old RequestContext.public static <T extends RequestContext> T getAndRemove()
RequestContext in the thread-local and returns it.public static void set(RequestContext ctx)
RequestContext in the thread-local.public static void remove()
RequestContext in the thread-local.Copyright © 2020 LeanCloud. All rights reserved.