Interface PerAgentTokenDao

    • Method Detail

      • save

        void save​(@NotNull
                  @NotNull String resultKey,
                  @NotNull
                  @NotNull String token)
        Saves token for a given result key.
        Parameters:
        resultKey - result key
        token - token
      • isValid

        boolean isValid​(@NotNull
                        @NotNull String resultKey,
                        @NotNull
                        @NotNull String token)
        Checks if token is valid for a given result key.
        Parameters:
        resultKey - result key
        token - token
        Returns:
        true if token is valid, false otherwise
      • isValidForAnyResultKey

        boolean isValidForAnyResultKey​(@NotNull
                                       @NotNull String token)
        Checks if token is valid for any result key.
        Parameters:
        token - token
        Returns:
        true if token is valid, false otherwise
      • delete

        void delete​(@NotNull
                    @NotNull String resultKey,
                    @NotNull
                    @NotNull Timestamp dueTimestamp)
        Deletes all tokens for a given result key created before the passed timestamp.
        Parameters:
        resultKey - result key
        dueTimestamp - due timestamp