Package org.castor.cache.hashbelt.reaper
Class ReinsertingReaper
- java.lang.Object
-
- org.castor.cache.hashbelt.reaper.AbstractReaper
-
- org.castor.cache.hashbelt.reaper.ReinsertingReaper
-
- All Implemented Interfaces:
Reaper
public abstract class ReinsertingReaper extends AbstractReaper
A hybrid of the notifying and refreshing reaper; like the notifying reaper, this calls handleExpiredObject for the object; like the refreshing reaper, it then reinserts it in the front of the expiration system. Unlike the refreshing reaper, it always returns the exact same object to the front of the expiration system.Useful for alerts and announcements. E.g. suppose you're supposed to send someone an update every 15 minutes. Use this one and an object that sends the message inside its "expire" method.
- Since:
- 1.0
- Version:
- $Revision: 8102 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- Author:
- Gregory Block
-
-
Constructor Summary
Constructors Constructor Description ReinsertingReaper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
handleExpiredContainer(Container expiredContainer)
Methode called with a container that has expired before the container is garbage collected.protected abstract void
handleExpiredObject(java.lang.Object expiredObject)
Methode called with an object that has expired before it is garbage collected.-
Methods inherited from class org.castor.cache.hashbelt.reaper.AbstractReaper
getCache, setCache
-
-
-
-
Method Detail
-
handleExpiredContainer
public final void handleExpiredContainer(Container expiredContainer)
Methode called with a container that has expired before the container is garbage collected.- Parameters:
expiredContainer
- The container that has expired.
-
handleExpiredObject
protected abstract void handleExpiredObject(java.lang.Object expiredObject)
Methode called with an object that has expired before it is garbage collected.- Parameters:
expiredObject
- The object that has expired.
-
-