Class DefaultTokenCleanupServices
java.lang.Object
com.broadleafcommerce.auth.token.service.DefaultTokenCleanupServices
A camel cluster service instance that will periodically execute
RotatableTokenStore.cleanupBatch(String, int)
calls against the datastore.
getPause()
is used to determine the amount of time to wait between cleanup runs. The
pause is used as a measure to throttle database activity resulting from cleaning up. The batch
size is also involved in throttling the effect of this cleanup service by controlling the count
of items checked for expiration.
Note, because this is a cluster service, only one instance will run in the cluster at a time. If an instance of auth service goes down, another instance of DefaultTokenCleanupServices will start to maintain a consistent count of 1 instance in the cluster.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultTokenCleanupServices
(TokenProperties properties, RotatableTokenStore tokenStore, org.springframework.scheduling.TaskScheduler scheduler) -
Method Summary
-
Field Details
-
started
protected boolean started
-
-
Constructor Details
-
DefaultTokenCleanupServices
public DefaultTokenCleanupServices(TokenProperties properties, RotatableTokenStore tokenStore, org.springframework.scheduling.TaskScheduler scheduler)
-
-
Method Details
-
start
public void start() -
isStarted
public boolean isStarted() -
stop
public void stop() -
cleanup
protected void cleanup() -
getPause
protected int getPause()
-