Package org.forgerock.am.cts.reaper
Interface TokenDeletionStrategy
-
public interface TokenDeletionStrategy
Is responsible for deleting expired tokens and performing any post-processing.Implementations should be made available to the
TokenDeleter
via the JavaServiceLoader
framework.At most one
TokenDeletionStrategy
should 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.
-
-