Class DeploymentEventsWatcher
- java.lang.Object
-
- org.craftercms.engine.util.deployment.DeploymentEventsWatcher
-
- All Implemented Interfaces:
EventListener
,org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
public class DeploymentEventsWatcher extends Object implements org.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
Utility class that runs on a cron job (configurable) and checks every site to see if they have a deployment events file (by defaultdeployment-events.properties
, which should contain timestamps sent by the Deployer indicating requests for clearing the site cache and/or rebuilding the context.- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_DEPLOYMENT_EVENTS_FILE_URL
-
Constructor Summary
Constructors Constructor Description DeploymentEventsWatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkForEvents()
void
checkForSiteEvents(SiteContext siteContext)
void
onApplicationEvent(org.springframework.context.ApplicationEvent event)
void
setDeploymentEventsFileUrl(String deploymentEventsFileUrl)
void
setSiteContextManager(SiteContextManager siteContextManager)
-
-
-
Field Detail
-
DEFAULT_DEPLOYMENT_EVENTS_FILE_URL
public static final String DEFAULT_DEPLOYMENT_EVENTS_FILE_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
setDeploymentEventsFileUrl
public void setDeploymentEventsFileUrl(String deploymentEventsFileUrl)
-
setSiteContextManager
public void setSiteContextManager(SiteContextManager siteContextManager)
-
checkForEvents
public void checkForEvents()
-
checkForSiteEvents
public void checkForSiteEvents(SiteContext siteContext)
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
-
-