com.atlassian.confluence.plugins.like.notifications.dao
Class CacheBackedNotificationDao
java.lang.Object
com.atlassian.confluence.plugins.like.notifications.dao.CacheBackedNotificationDao
- All Implemented Interfaces:
- NotificationDao, org.springframework.beans.factory.InitializingBean
public class CacheBackedNotificationDao
- extends java.lang.Object
- implements NotificationDao, org.springframework.beans.factory.InitializingBean
Employs a cache to provide temporary persistence of notifications.
Given the current CacheKey implementation and a max cache size of 10,000, a full cache consumes about ~4.5Mb of heap.
(See ehcache.xml for configuration.)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CACHE_NAME
public static final java.lang.String CACHE_NAME
CacheBackedNotificationDao
public CacheBackedNotificationDao(com.atlassian.cache.CacheManager cacheManager)
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
exists
public boolean exists(LikeNotification notification)
- Description copied from interface:
NotificationDao
- Returns true if the specified notification exists, false otherwise.
- Specified by:
exists
in interface NotificationDao
- Parameters:
notification
- the notification
- Returns:
- true if the specified notification exists, false otherwise.
save
public void save(LikeNotification notification)
- Description copied from interface:
NotificationDao
- Persist the specified notification.
- Specified by:
save
in interface NotificationDao
- Parameters:
notification
- the notification
Copyright © 2003-2014 Atlassian. All Rights Reserved.