public class CachingUserHistoryStore extends Object implements UserHistoryStore
UserHistoryStore.
This is very broken, but no more broken than any of the other caches.| Constructor and Description |
|---|
CachingUserHistoryStore(OfBizUserHistoryStore delegatingStore,
ApplicationProperties applicationProperties,
com.atlassian.cache.CacheManager cacheManager) |
public CachingUserHistoryStore(@Nonnull OfBizUserHistoryStore delegatingStore, @Nonnull ApplicationProperties applicationProperties, @Nonnull com.atlassian.cache.CacheManager cacheManager)
@EventListener public void onComponentManagerStarted(ComponentManagerStartedEvent startedEvent)
@EventListener public void onComponentManagerShutdown(ComponentManagerShutdownEvent shutdownEvent)
@EventListener public void onClearCache(ClearCacheEvent event)
@EventListener public void onUserHistoryItemFKChangedEvent(UserHistoryItemFKChangedEvent event)
public void addHistoryItem(ApplicationUser user, @Nonnull UserHistoryItem historyItem)
UserHistoryStoreaddHistoryItem in interface UserHistoryStoreuser - The user to store the history item againsthistoryItem - the item to store. Containing a timestamp and referenced entity@Nonnull public List<UserHistoryItem> getHistory(@Nonnull UserHistoryItem.Type type, @Nonnull String userKey)
UserHistoryStoregetHistory in interface UserHistoryStoretype - The type of entity to retrieve history for.userKey - The key of the user to retrieve history for.@Nonnull public List<UserHistoryItem> getHistory(@Nonnull UserHistoryItem.Type type, @Nonnull ApplicationUser user)
UserHistoryStoregetHistory in interface UserHistoryStoretype - The type of entity to retrieve history for.user - The user to retrieve history for.public Set<UserHistoryItem.Type> removeHistoryForUser(@Nonnull ApplicationUser user)
UserHistoryStoreremoveHistoryForUser in interface UserHistoryStoreuser - The user to remove all history of.public void removeHistoryOlderThan(@Nonnull Long timestamp)
UserHistoryStoreremoveHistoryOlderThan in interface UserHistoryStoretimestamp - remove elements older than this timestamppublic static int getMaxItems(UserHistoryItem.Type type, ApplicationProperties applicationProperties)
Copyright © 2002-2023 Atlassian. All Rights Reserved.