Class DefaultTokenCleanupServices
- java.lang.Object
-
- com.broadleafcommerce.auth.token.service.DefaultTokenCleanupServices
-
public class DefaultTokenCleanupServices extends Object
A camel cluster service instance that will periodically executeRotatableTokenStore.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
Fields Modifier and Type Field Description protected booleanstarted
-
Constructor Summary
Constructors Constructor Description DefaultTokenCleanupServices(TokenProperties properties, RotatableTokenStore tokenStore, org.springframework.scheduling.TaskScheduler scheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcleanup()protected intgetPause()booleanisStarted()voidstart()voidstop()
-
-
-
Constructor Detail
-
DefaultTokenCleanupServices
public DefaultTokenCleanupServices(TokenProperties properties, RotatableTokenStore tokenStore, org.springframework.scheduling.TaskScheduler scheduler)
-
-