Class DefaultAuthorizationCleanupServices
java.lang.Object
com.broadleafcommerce.auth.authorization.service.DefaultAuthorizationCleanupServices
A camel cluster service instance that will periodically execute
CustomizedOAuth2AuthorizationRepository.cleanupBatch(String)
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
ConstructorDescriptionDefaultAuthorizationCleanupServices
(TokenProperties properties, OAuth2AuthorizationRepository<JpaOAuth2Authorization> repository, org.springframework.scheduling.TaskScheduler scheduler) -
Method Summary
-
Field Details
-
started
protected boolean started
-
-
Constructor Details
-
DefaultAuthorizationCleanupServices
public DefaultAuthorizationCleanupServices(TokenProperties properties, OAuth2AuthorizationRepository<JpaOAuth2Authorization> repository, org.springframework.scheduling.TaskScheduler scheduler)
-
-
Method Details
-
start
public void start() -
stop
public void stop() -
cleanup
protected void cleanup() -
getPause
protected int getPause() -
isStarted
public boolean isStarted()
-