com.almworks.jira.structure.api.cache.StructureCacheHelper Maven / Gradle / Ivy
Show all versions of structure-api Show documentation
package com.almworks.jira.structure.api.cache;
import com.atlassian.annotations.Internal;
import com.atlassian.jira.user.ApplicationUser;
import org.jetbrains.annotations.NotNull;
@Internal
public interface StructureCacheHelper {
/**
* Clears all caches on the current JIRA instance that are maintained by Structure and Structure extensions.
*
* Note that in JIRA Data Center environment, this does not clear caches on other nodes.
*
* After this method has finished execution, the caches are cleared.
*
* @see com.almworks.jira.structure.api.lifecycle.CachingComponent
* @see #clearAllStructureCachesOnAllNodes()
*/
void clearAllStructureCaches();
/**
* Clears all caches (maintained by Structure and Structure extensions) on the current JIRA instance and causes
* eventual caches clearing on other nodes (when running on JIRA Data Center).
*
* When running on non-JDC instance, works the same as {@link #clearAllStructureCaches()}.
*
* After this method has finished execution, the caches are cleared on the local node, but may not be cleared
* yet on other nodes.
*
* @see com.almworks.jira.structure.api.lifecycle.CachingComponent
* @see #clearAllStructureCaches()
*/
void clearAllStructureCachesOnAllNodes();
/**
* Clears caches on the all nodes for the given non-anonymous user (maintained by Structure and Structure extensions) on the current
* JIRA instance and causes eventual caches clearing on other nodes (when running on JIRA Data Center).
*
* When running on non-JDC instance, works the same as {@link #clearUserStructureCaches(ApplicationUser)}.
*
* After this method has finished execution, the user-related caches are cleared on the local node, but may not be cleared yet on
* other nodes.
*
* @see com.almworks.jira.structure.api.lifecycle.CachingComponent
* @see #clearUserStructureCaches(ApplicationUser)
*/
void clearUserStructureCachesOnAllNodes(@NotNull ApplicationUser user);
/**
* Clears caches on the current node for the current user.
*/
void clearCurrentUserStructureCaches();
/**
* Clears caches on the current node for the given non-anonymous user.
*/
void clearUserStructureCaches(@NotNull ApplicationUser user);
}