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 default
deployment-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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
checkForSiteEvents
(SiteContext siteContext) void
onApplicationEvent
(org.springframework.context.ApplicationEvent event) void
setDeploymentEventsFileUrl
(String deploymentEventsFileUrl) void
setSiteContextManager
(SiteContextManager siteContextManager)
-
Field Details
-
DEFAULT_DEPLOYMENT_EVENTS_FILE_URL
- See Also:
-
-
Constructor Details
-
DeploymentEventsWatcher
public DeploymentEventsWatcher()
-
-
Method Details
-
setDeploymentEventsFileUrl
-
setSiteContextManager
-
checkForEvents
public void checkForEvents() -
checkForSiteEvents
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event) - Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.ApplicationEvent>
-