Class SecretEntry

java.lang.Object
overit.geocall.secrets.SecretEntry
All Implemented Interfaces:
Serializable, Entry<Secret,Secret>

public class SecretEntry extends Object implements Entry<Secret,Secret>
Represents a Cache Entry for the Secret.
See Also:
  • Field Details

    • LOG

      protected static final LogChannel LOG
    • CACHE_TIME_IN_MILLISECONDS

      protected static final int CACHE_TIME_IN_MILLISECONDS
      See Also:
    • companyId

      protected final Long companyId
    • name

      protected final String name
    • versionId

      protected final String versionId
    • client

      protected final SecretsManagerClient client
  • Constructor Details

  • Method Details

    • getKey

      public String getKey()
      Description copied from interface: Entry
      Defines the name of a cacheable object
      Specified by:
      getKey in interface Entry<Secret,Secret>
      Returns:
      the name of a cacheable object
    • load

      public Secret load()
      Description copied from interface: Entry
      The method for obtaining the real value of the entry
      Specified by:
      load in interface Entry<Secret,Secret>
      Returns:
      the real value of the entry. This method must be used when the cache doesn't contains a version for this Entry
    • compose

      public Secret compose(Secret secret)
      Description copied from interface: Entry
      The method for obtaining the composed instance of the object. This method allows the real instance of the object to be aggregated with other information, such as the composition of a system configuration with the default one
      Specified by:
      compose in interface Entry<Secret,Secret>
      Parameters:
      secret - the real instance of the object
      Returns:
      the composed instance of the object. This method must be used after the invocation of the Entry.load() method when the cache doesn't contain a version for this entry.
    • getStoreTtl

      public long getStoreTtl()
      Description copied from interface: Entry
      Defines the ttl in milliseconds for the entry to remain in the local cache. After this interval, the entry should be removed.
      Specified by:
      getStoreTtl in interface Entry<Secret,Secret>
      Returns:
      the ttl or -1 if the entry will never expire
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object