Record Class CacheEntryEntity

java.lang.Object
java.lang.Record
io.micronaut.cache.oracle.persistence.CacheEntryEntity
Record Components:
id - The composite cache entry identifier
keyPayload - The serialized cache key payload
valuePayload - The serialized cache value payload
valueWeight - The stored value weight
createdAt - The row creation time
lastAccessAt - The last access time
expiresAt - The expiry time

@MappedEntity("${micronaut.oracle.cache.prefix:MN}_CACHE_ENTRY") public record CacheEntryEntity(CacheEntryId id, byte[] keyPayload, byte[] valuePayload, Long valueWeight, Instant createdAt, Instant lastAccessAt, Instant expiresAt) extends Record
Cache entry row persisted in Oracle.
Since:
6.2.0
Author:
Davide Cocco
  • Constructor Details

    • CacheEntryEntity

      public CacheEntryEntity(CacheEntryId id, byte[] keyPayload, byte[] valuePayload, Long valueWeight, Instant createdAt, Instant lastAccessAt, Instant expiresAt)
      Creates an instance of a CacheEntryEntity record class.
      Parameters:
      id - the value for the id record component
      keyPayload - the value for the keyPayload record component
      valuePayload - the value for the valuePayload record component
      valueWeight - the value for the valueWeight record component
      createdAt - the value for the createdAt record component
      lastAccessAt - the value for the lastAccessAt record component
      expiresAt - the value for the expiresAt record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      @EmbeddedId public CacheEntryId id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • keyPayload

      @MappedProperty("KEY_PAYLOAD") public byte[] keyPayload()
      Returns the value of the keyPayload record component.
      Returns:
      the value of the keyPayload record component
    • valuePayload

      @MappedProperty("VALUE_PAYLOAD") public byte[] valuePayload()
      Returns the value of the valuePayload record component.
      Returns:
      the value of the valuePayload record component
    • valueWeight

      @MappedProperty("VALUE_WEIGHT") public Long valueWeight()
      Returns the value of the valueWeight record component.
      Returns:
      the value of the valueWeight record component
    • createdAt

      @MappedProperty("CREATED_AT") public Instant createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • lastAccessAt

      @MappedProperty("LAST_ACCESS_AT") public Instant lastAccessAt()
      Returns the value of the lastAccessAt record component.
      Returns:
      the value of the lastAccessAt record component
    • expiresAt

      @MappedProperty("EXPIRES_AT") public Instant expiresAt()
      Returns the value of the expiresAt record component.
      Returns:
      the value of the expiresAt record component