Class PerAgentTokenHibernateDao

    • Constructor Detail

      • PerAgentTokenHibernateDao

        public PerAgentTokenHibernateDao()
    • Method Detail

      • save

        public void save​(@NotNull
                         @NotNull String resultKey,
                         @NotNull
                         @NotNull String token)
        Description copied from interface: PerAgentTokenDao
        Saves token for a given result key.
        Specified by:
        save in interface PerAgentTokenDao
        Parameters:
        resultKey - result key
        token - token
      • isValid

        public boolean isValid​(@NotNull
                               @NotNull String resultKey,
                               @NotNull
                               @NotNull String token)
        Description copied from interface: PerAgentTokenDao
        Checks if token is valid for a given result key.
        Specified by:
        isValid in interface PerAgentTokenDao
        Parameters:
        resultKey - result key
        token - token
        Returns:
        true if token is valid, false otherwise
      • isValidForAnyResultKey

        public boolean isValidForAnyResultKey​(@NotNull
                                              @NotNull String token)
        Description copied from interface: PerAgentTokenDao
        Checks if token is valid for any result key.
        Specified by:
        isValidForAnyResultKey in interface PerAgentTokenDao
        Parameters:
        token - token
        Returns:
        true if token is valid, false otherwise
      • delete

        public void delete​(@NotNull
                           @NotNull String resultKey,
                           @NotNull
                           @NotNull Timestamp dueTimestamp)
        Description copied from interface: PerAgentTokenDao
        Deletes all tokens for a given result key created before the passed timestamp.
        Specified by:
        delete in interface PerAgentTokenDao
        Parameters:
        resultKey - result key
        dueTimestamp - due timestamp