Skip to content

Commit

Permalink
SAK-33688 .newCache => .getCache; Cache => Cache<k, v> (sakaiproject#…
Browse files Browse the repository at this point in the history
  • Loading branch information
axxter99 authored and jonespm committed Dec 8, 2017
1 parent d57408e commit a35680a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public class DiscussionForumManagerImpl extends HibernateDaoSupport implements
private UIPermissionsManager permissionsManager;
private EntityBroker entityBroker;
private MemoryService memoryService;
private Cache allowedFunctionsCache;
private Cache<String, Set<?>> allowedFunctionsCache;
private EventTrackingService eventTrackingService;
private ThreadLocalManager threadLocalManager;
private ToolManager toolManager;
Expand All @@ -125,7 +125,7 @@ public class DiscussionForumManagerImpl extends HibernateDaoSupport implements
public void init()
{
LOG.info("init()");
allowedFunctionsCache = memoryService.newCache("org.sakaiproject.component.app.messageforums.ui.DiscussionForumManagerImpl.allowedFunctionsCache");
allowedFunctionsCache = memoryService.getCache("org.sakaiproject.component.app.messageforums.ui.DiscussionForumManagerImpl.allowedFunctionsCache");
}

public void setEntityBroker(EntityBroker entityBroker) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ public class UIPermissionsManagerImpl implements UIPermissionsManager {
private DiscussionForumManager forumManager;
private AreaManager areaManager;
private MemoryService memoryService;
private Cache userGroupMembershipCache;
private Cache<String, Collection<?>> userGroupMembershipCache;
private UserDirectoryService userDirectoryService;
private SiteService siteService;
private ThreadLocalManager threadLocalManager;

public void init()
{
LOG.info("init()");
userGroupMembershipCache = memoryService.newCache("org.sakaiproject.component.app.messageforums.ui.UIPermissionsManagerImpl.userGroupMembershipCache");
userGroupMembershipCache = memoryService.getCache("org.sakaiproject.component.app.messageforums.ui.UIPermissionsManagerImpl.userGroupMembershipCache");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public class BullhornServiceImpl implements BullhornService, Observer {

private boolean commonsInstalled = false;

private Cache countCache = null;
private Cache<String, Map> countCache = null;

public void init() {

Expand Down Expand Up @@ -186,7 +186,7 @@ public void init() {
sqlService.ddl(this.getClass().getClassLoader(), "bullhorn_tables");
}

countCache = memoryService.newCache("bullhorn_alert_count_cache");
countCache = memoryService.getCache("bullhorn_alert_count_cache");
}

public void update(Observable o, final Object arg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public class StatsManagerImpl extends HibernateDaoSupport implements StatsManage
private ContentTypeImageService M_ctis;

/** Caching */
private Cache cachePrefsData = null;
private Cache<String, PrefsData> cachePrefsData = null;



Expand Down Expand Up @@ -335,7 +335,7 @@ public void init(){

// Initialize cacheReportDef and event observer for preferences invalidation across cluster
M_ets.addPriorityObserver(this);
cachePrefsData = M_ms.newCache(PrefsData.class.getName());
cachePrefsData = M_ms.getCache(PrefsData.class.getName());

logger.info("init(): - (Event.getContext()?, site visits enabled, charts background color, charts in 3D, charts transparency, item labels visible on bar charts) : " +
isEventContextSupported+','+enableSiteVisits+','+chartBackgroundColor+','+chartIn3D+','+chartTransparency+','+itemLabelsVisible);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class EntityBrokerEventRegistry extends Observable implements EventRegist
private Map<String, String> eventIdToEPPrefix = new HashMap<String, String>();

/** Caching */
private Cache eventNamesCache = null;
private Cache<String, String> eventNamesCache = null;

/** Sakai Services */
private SessionManager M_sm;
Expand Down Expand Up @@ -79,7 +79,7 @@ public void init() {
LOG.info("init()");

// configure cache
eventNamesCache = M_ms.newCache(CACHENAME);
eventNamesCache = M_ms.getCache(CACHENAME);

// register EntityBrokerListener
M_epm.registerListener(this, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class EventRegistryServiceImpl implements EventRegistry, EventRegistrySer
private List<String> serverEventIds = new ArrayList<String>();

/** Caching */
private Cache eventRegistryCache = null;
private Cache<String, List> eventRegistryCache = null;

/** Sakai services */
private StatsManager M_sm;
Expand Down Expand Up @@ -111,7 +111,7 @@ public void init() {
LOG.info("init(): " + willCheckLocalEventNamesFirst);

// configure cache
eventRegistryCache = M_ms.newCache(CACHENAME);
eventRegistryCache = M_ms.getCache(CACHENAME);
}

// ################################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public class ReportManagerImpl extends HibernateDaoSupport implements ReportMana
private MemoryService M_ms;

/** Caching */
private Cache cacheReportDef = null;
private Cache<String, Object> cacheReportDef = null;


// ################################################################
Expand Down Expand Up @@ -193,7 +193,7 @@ public void setResourceLoader(ResourceLoader msgs) {
public void init(){
// Initialize cacheReportDef and event observer for cacheReportDef invalidation across cluster
M_ets.addPriorityObserver(this);
cacheReportDef = M_ms.newCache(ReportDef.class.getName());
cacheReportDef = M_ms.getCache(ReportDef.class.getName());
}

public void destroy(){
Expand Down

0 comments on commit a35680a

Please sign in to comment.