@Override Cache<DirectoryEntityKey, OfBizUser> createCache() { return cacheManager.getCache(EagerOfBizUserCache.class.getName() + ".userCache", null, USER_CACHE_SETTINGS); }
public void start() { this.activeWorkflowCache = cacheManager.getCachedReference(WORKFLOW_CACHE_NAME, new WorkflowSupplier()); this.workflowSchemeEntityCache = cacheManager.getCache(ENTITY_CACHE_NAME, new WorkflowSchemeEntitySupplier()); eventPublisher.register(this); }
public CachingTaggingAvatarStore(final OfBizDelegator ofBizDelegator, final AvatarTagger avatarTagger, CacheManager cacheManager) { final String classPrefix = CachingTaggingAvatarStore.class.getName(); this.taggedAvatars = cacheManager.getCache(classPrefix + ".taggedAvatars", new TagAndRetrieve()); this.avatars = cacheManager.getCache(classPrefix + ".avatars", new CheckForTaggedVersionFallbackToDb()); this.ofBizDelegator = ofBizDelegator; this.avatarTagger = avatarTagger; }
public CachingWorkflowDescriptorStore(final WorkflowDescriptorStore delegate, final CacheManager cacheManager) { this.delegate = delegate; workflowCache = cacheManager.getCache(CachingWorkflowDescriptorStore.class.getName() + ".workflowCache", new WorkflowCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build()); allNamesCache = cacheManager.getCachedReference(CachingWorkflowDescriptorStore.class.getName() + ".allNamesCache", new AllNamesSupplier()); }
public CachedGenericConfigManager(final GenericConfigManager delegate, final CacheManager cacheManager) { this.delegate = delegate; cache = cacheManager.getCache(CachedGenericConfigManager.class.getName() + ".cache", new GeneralConfigCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build()); }
public CachingFieldScreenStore(FieldScreenStore decoratedStore, CacheManager cacheManager) { this.decoratedStore = decoratedStore; allScreensCache = cacheManager.getCachedReference("com.atlassian.jira.issue.fields.screen.CachingFieldScreenStore.allScreensCache", new AllScreenSupplier()); fieldScreenCache = cacheManager.getCache("com.atlassian.jira.issue.fields.screen.CachingFieldScreenStore.fieldScreenCache", new FieldScreenCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build()); }
public CachingDraftWorkflowStore(final DraftWorkflowStore delegate, CacheManager cacheManager) { this.delegate = delegate; draftWorkflowCache = cacheManager.getCache(CachingDraftWorkflowStore.class.getName() + ".draftWorkflowCache", new DraftWorkflowCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build()); }
public CacheHolder() { CacheSettings cacheSettings = new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build(); mailServerCache = cacheManagerRef.get().getCache(CACHE_NAME, new MailServerCacheLoader(), cacheSettings); CacheSettings allCacheSettings = new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build(); allMailServerCache = cacheManagerRef.get().getCachedReference(ALL_CACHE_NAME, new AllMailServersSupplier(), allCacheSettings); eventPublisherRef.get().register(this); }
TokenManagerImpl(final long timeout, final PermissionManager permissionManager, final LoginService loginService, final JiraAuthenticationContext authenticationContext, final UserManager userManager, final CacheManager cacheManager) { this.permissionManager = permissionManager; this.loginService = loginService; this.authenticationContext = authenticationContext; this.userManager = userManager; userTokens = cacheManager.getCache(TokenManagerImpl.class.getName() + ".userCache", null, new CacheSettingsBuilder().replicateViaCopy().expireAfterAccess(timeout, TimeUnit.MILLISECONDS).build()); }
CachingUserHistoryStore(@Nonnull final OfBizUserHistoryStore delegatingStore, @Nonnull final ApplicationProperties applicationProperties, final CacheManager cacheManager, int maxThreshold) { this.delegatingStore = notNull("delegatingStore", delegatingStore); this.applicationProperties = notNull("applicationProperties", applicationProperties); this.maxThreshold = maxThreshold; this.cache = cacheManager.getCache(CachingUserHistoryStore.class.getName() + ".cache", new DelegatingStoreCacheLoader(), new CacheSettingsBuilder().local().expireAfterAccess(15, TimeUnit.MINUTES).build()); }
public CachingPortalPageStore(final PortalPageStore delegateStore, final CacheManager cacheManager) { Assertions.notNull("delegateStore", delegateStore); this.delegateStore = delegateStore; cacheByUser = cacheManager.getCache(CachingPortalPageStore.class.getName() + ".cacheByUser", new ByUserCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build()); cacheById = cacheManager.getCache(CachingPortalPageStore.class.getName() + ".cacheById", new ByIdCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build()); }
public CachingSharePermissionStore(final SharePermissionStore delegateStore, final CacheManager cacheManager) { Assertions.notNull("delegateStore", delegateStore); this.delegateStore = delegateStore; cache = cacheManager.getCache(CachingSharePermissionStore.class.getName() + ".cache", new SharePermissionsCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).build()); }
public LazyOfBizGroupCache(final CacheManager cacheManager, final OfBizDelegator ofBizDelegator) { this.ofBizDelegator = ofBizDelegator; this.cache = cacheManager.getCache(LazyOfBizGroupCache.class.getName() + ".groupCache", new GroupCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(30, TimeUnit.MINUTES).flushable() .build()); }
public AbstractFieldLayoutManager(final FieldManager fieldManager, final OfBizDelegator ofBizDelegator, final I18nHelper.BeanFactory i18nFactory, final CacheManager cacheManager, final ApplicationProperties applicationProperties) { this.fieldManager = notNull("fieldManager", fieldManager); this.ofBizDelegator = ofBizDelegator; this.i18nFactory = i18nFactory; this.defaultFieldLayoutItems = createDefaultFieldLayoutItems(fieldManager); this.fieldLayoutCache = cacheManager.getCache(AbstractFieldLayoutManager.class.getName() + ".fieldLayoutCache", new FieldLayoutCacheLoader(), new CacheSettingsBuilder().build()); this.applicationProperties = applicationProperties; }
public CachedOptionSetManager(OptionSetPersister optionSetPersister, ConstantsManager constantsManager, CacheManager cacheManager) { this.optionSetManager = new OptionSetManagerImpl(optionSetPersister, constantsManager); this.cache = cacheManager.getCache(CachedOptionSetManager.class.getName() + ".cache", new OptionSetLoader(), new CacheSettingsBuilder().expireAfterAccess(30, MINUTES).build()); }
public CachingOfBizPropertyEntryStore(final DelegatorInterface genericDelegator, final CacheManager cacheManager) { this.genericDelegator = notNull("genericDelegator", genericDelegator); this.entries = cacheManager.getCache( CachingOfBizPropertyEntryStore.class.getName() + ".entries", new EntryLoader(), new CacheSettingsBuilder() .expireAfterAccess(30, TimeUnit.MINUTES) .build()); }
public CachingLabelStore(final OfBizLabelStore delegateStore, CacheManager cacheManager) { this.delegateStore = delegateStore; cache = cacheManager.getCache(CachingLabelStore.class.getName() + ".cache", new LabelCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(10, TimeUnit.MINUTES).maxEntries(1000).build()); }
public LazyOfBizUserCache(final CacheManager cacheManager, final OfBizDelegator ofBizDelegator) { this.ofBizDelegator = ofBizDelegator; this.cache = cacheManager.getCache(LazyOfBizUserCache.class.getName() + ".userCache", new UserCacheLoader(), new CacheSettingsBuilder() .expireAfterAccess(30, TimeUnit.MINUTES).flushable().build()); }
public ClusterLogScanCache(CacheManager cacheManager) { lastScan = cacheManager.getCache("com.atlassian.stp.lastLogScan", null, new CacheSettingsBuilder() .expireAfterWrite(CACHE_EXPIRY_DURATION_MS, TimeUnit.MILLISECONDS) .local() .build()); }
public CachingFavouritesStore(final FavouritesStore delegateStore, final CacheManager cacheManager) { this.delegateStore = notNull("delegateStore", delegateStore); favouritesCache = cacheManager.getCache(CachingFavouritesStore.class.getName() + ".favouritesCache", new KeyCollectionCacheLoader(), new CacheSettingsBuilder().expireAfterAccess(10, TimeUnit.MINUTES).maxEntries(1000).build()); }