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 int
protected final SandboxNotificationPruneRepository
protected final List<ScheduledFuture<?>>
protected boolean
Fields 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, wait
Methods 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:
isRunning
in interfaceorg.springframework.context.Lifecycle
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartup
in interfaceorg.springframework.context.SmartLifecycle
-
start
public void start()- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
-
cleanup
protected void cleanup()On interval, remove "stale" expired notification states -
isStarted
public boolean isStarted()
-