@ParametersAreNonnullByDefault public final class

JiraVCacheInitialisationUtils

extends Object
java.lang.Object
   ↳ com.atlassian.jira.cache.JiraVCacheInitialisationUtils

Class Overview

Initialisation utilities for VCache.

Summary

Public Methods
static void cleanupVCache()
Executes any transactions associated with current request context and cleans it up.
static JiraTenantImpl getFakeTenant()
Temporary method to get current tenant as TenantContext is not implemented correctly in JIRA.
static boolean initVCache(JiraTenantImpl currentTenant)
Initialises thread local request context for VCache with the tenant provided as a parameter.
static boolean initVCache()
Initialises thread local request context for VCache with the tenant supplied by TenantContext.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static void cleanupVCache ()

Executes any transactions associated with current request context and cleans it up.

public static JiraTenantImpl getFakeTenant ()

Temporary method to get current tenant as TenantContext is not implemented correctly in JIRA. For the time being it should be called by anything that needs current tenant. NOTE: This method will be removed once JVC-18 is fixed.

Returns
  • static fake tenant.

public static boolean initVCache (JiraTenantImpl currentTenant)

Initialises thread local request context for VCache with the tenant provided as a parameter.

Parameters
currentTenant tenant with which request context will be initialised.
Returns
  • true if context was initialised successfully, false otherwise

public static boolean initVCache ()

Initialises thread local request context for VCache with the tenant supplied by TenantContext.

Returns
  • true if context was initialised successfully, false otherwise.