Package org.forgerock.am.cts.reaper
Interface TokenDeletionStrategy
-
public interface TokenDeletionStrategyIs responsible for deleting expired tokens and performing any post-processing.Implementations should be made available to the
TokenDeletervia the JavaServiceLoaderframework.At most one
TokenDeletionStrategyshould be defined perTokenType.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Promise<PartialToken,CoreTokenException>delete(String tokenId, TokenType tokenType, long expiryTime)Delete the token from the CTS persistence store.Set<TokenType>getSupportedTokenTypes()Returns the set of token types this deletion strategy can handle.
-
-
-
Method Detail
-
getSupportedTokenTypes
Set<TokenType> getSupportedTokenTypes()
Returns the set of token types this deletion strategy can handle. Must not intersect with any other TokenDeletionStrategys.- Returns:
- The set of supported token types
-
delete
Promise<PartialToken,CoreTokenException> delete(String tokenId, TokenType tokenType, long expiryTime)
Delete the token from the CTS persistence store.- Parameters:
tokenId- The ID of the token to be deleted.tokenType- The type of the token to be deleted.expiryTime- The time at which this token is currently due to expire and be eligible for deletion.- Returns:
- A promise which allows the caller to know when the delete request completed and whether or not any exception was thrown in the attempt.
-
-