Class SandboxNotificationPruneService
java.lang.Object
com.broadleafcommerce.sandbox.service.SandboxNotificationPruneService
- All Implemented Interfaces:
org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
public class SandboxNotificationPruneService
extends Object
implements org.springframework.context.SmartLifecycle
This service is intended to be "singleton" on a cluster level It will be run its job - clean up
through
SandboxNotificationPruneRepository every 23 hours-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected final SandboxNotificationPruneRepositoryprotected final List<ScheduledFuture<?>>protected booleanFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionSandboxNotificationPruneService(SandboxNotificationPruneRepository repository, org.springframework.scheduling.TaskScheduler scheduler, com.broadleafcommerce.common.extension.data.DataRouteSupporting route) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
getPhase, stop
-
Field Details
-
DELAY_BETWEEN_RUN_HOURS
public static final int DELAY_BETWEEN_RUN_HOURS- See Also:
-
repository
-
started
protected boolean started -
scheduledTasks
-
-
Constructor Details
-
SandboxNotificationPruneService
public SandboxNotificationPruneService(SandboxNotificationPruneRepository repository, org.springframework.scheduling.TaskScheduler scheduler, com.broadleafcommerce.common.extension.data.DataRouteSupporting route)
-
-
Method Details
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
cleanup
protected void cleanup()On interval, remove "stale" expired notification states -
isStarted
public boolean isStarted()
-