public class TenantIdUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TENANT_ID_FIELD |
static String |
TENANT_ID_UNKNOWN |
Modifier and Type | Method and Description |
---|---|
static void |
clearMDC()
Removes the tenant id field from the
MDC . |
static String |
getFromMDC()
Gets a tenant id value from the MDC, if existing, or null otherwise.
|
static boolean |
mdcHasEntry()
Checks whether there's a tenant id entry in the
MDC . |
static void |
putInMDC(String tenantId)
Puts the provided tenant id into the
MDC under the key
"tenant_id". |
public static final String TENANT_ID_FIELD
public static final String TENANT_ID_UNKNOWN
public static boolean mdcHasEntry()
MDC
.public static void putInMDC(String tenantId)
MDC
under the key
"tenant_id".tenantId
- the tenant idpublic static String getFromMDC()
public static void clearMDC()
MDC
.Copyright © 2023. All rights reserved.