Class MessageGroupStoreReaper
java.lang.Object
org.springframework.integration.store.MessageGroupStoreReaper
- All Implemented Interfaces:
- Runnable,- DisposableBean,- InitializingBean,- Lifecycle,- Phased,- SmartLifecycle
public class MessageGroupStoreReaper
extends Object
implements Runnable, DisposableBean, InitializingBean, SmartLifecycle
Convenient configurable component to allow explicit timed expiry of 
MessageGroup instances in a
 MessageGroupStore. This component provides a no-args run() method that is useful for remote or timed
 execution and a destroy() method that can optionally be called on shutdown.- Author:
- Dave Syer, Dave Turanski, Artem Bilan
- 
Field SummaryFields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoiddestroy()intgetPhase()booleanfinal booleanvoidrun()Expire all message groups older than thetimeoutprovided.voidsetAutoStartup(boolean autoStartup) voidsetExpireOnDestroy(boolean expireOnDestroy) Flag to indicate that the stores should be expired when this component is destroyed (i.e.voidsetMessageGroupStore(MessageGroupStore messageGroupStore) A message group store to expire according the other configurations.voidsetPhase(int phase) voidsetTimeout(long timeout) Timeout in milliseconds (default -1).final voidstart()voidstop()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecyclestop
- 
Constructor Details- 
MessageGroupStoreReaper
- 
MessageGroupStoreReaperpublic MessageGroupStoreReaper()
 
- 
- 
Method Details- 
setExpireOnDestroypublic void setExpireOnDestroy(boolean expireOnDestroy) Flag to indicate that the stores should be expired when this component is destroyed (i.e. usually when its enclosingApplicationContextis closed).- Parameters:
- expireOnDestroy- the flag value to set
 
- 
setTimeoutpublic void setTimeout(long timeout) Timeout in milliseconds (default -1). If negative then no groups ever time out. If greater than zero then all groups older than that value are expired when this component isrun().- Parameters:
- timeout- the timeout to set
 
- 
setMessageGroupStoreA message group store to expire according the other configurations.- Parameters:
- messageGroupStore- the- MessageGroupStoreto set
 
- 
afterPropertiesSetpublic void afterPropertiesSet()- Specified by:
- afterPropertiesSetin interface- InitializingBean
 
- 
destroypublic void destroy()- Specified by:
- destroyin interface- DisposableBean
 
- 
run
- 
start
- 
stop
- 
isRunning
- 
getPhasepublic int getPhase()- Specified by:
- getPhasein interface- Phased
- Specified by:
- getPhasein interface- SmartLifecycle
 
- 
setPhasepublic void setPhase(int phase) 
- 
isAutoStartuppublic boolean isAutoStartup()- Specified by:
- isAutoStartupin interface- SmartLifecycle
 
- 
setAutoStartuppublic void setAutoStartup(boolean autoStartup) 
 
-