Class MetaParamsInternalMetadata

All Implemented Interfaces:
MetaParam.Lookup, InternalMetadata, Metadata

@Experimental @ProtoTypeId(1003) public final class MetaParamsInternalMetadata extends Object implements InternalMetadata, MetaParam.Lookup
Metadata parameters backed internal metadata representation.
  • Method Details

    • from

      public static Metadata from(MetaParams params)
    • created

      @ProtoField(number=3, defaultValue="-1") public long created()
      Specified by:
      created in interface InternalMetadata
    • lastUsed

      @ProtoField(number=4, defaultValue="-1") public long lastUsed()
      Specified by:
      lastUsed in interface InternalMetadata
    • isExpired

      public boolean isExpired(long now)
      Specified by:
      isExpired in interface InternalMetadata
    • expiryTime

      public long expiryTime()
      Specified by:
      expiryTime in interface InternalMetadata
    • lifespan

      @ProtoField(number=5, defaultValue="-1") public long lifespan()
      Description copied from interface: Metadata
      Returns the lifespan of the cache entry with which this metadata object is associated, in milliseconds. Negative values are interpreted as unlimited lifespan.
      Specified by:
      lifespan in interface Metadata
      lifespan of the entry in number of milliseconds
    • maxIdle

      @ProtoField(number=6, defaultValue="-1") public long maxIdle()
      Description copied from interface: Metadata
      Returns the the maximum amount of time that the cache entry associated with this metadata object is allowed to be idle for before it is considered as expired, in milliseconds.
      Specified by:
      maxIdle in interface Metadata
      maximum idle time of the entry in number of milliseconds
    • counterConfiguration

      @ProtoField(7) public CounterConfiguration counterConfiguration()
    • updateCreationTimestamp

      @ProtoField(value=8, defaultValue="true") public boolean updateCreationTimestamp()
      Description copied from interface: Metadata
      Returns if the creation timestamp is updated when an entry is modified.

      Created entries always update the creation timestamp.

      This capability is experimental and all Infinispan implementations return true. To update creation timestamps you must create a custom Metadata implementation.

      Specified by:
      updateCreationTimestamp in interface Metadata
      true to update the creation timestamp when entries are modified.
    • version

      public EntryVersion version()
      Description copied from interface: Metadata
      Returns the version of the cache entry with which this metadata object is associated.
      Specified by:
      version in interface Metadata
      version of the entry
    • builder

      Description copied from interface: Metadata
      Returns an instance of Metadata.Builder which can be used to build new instances of Metadata instance which are full copies of this Metadata.
      Specified by:
      builder in interface Metadata
      instance of Metadata.Builder
    • findMetaParam

      public <T extends MetaParam> Optional<T> findMetaParam(Class<T> type)
      Description copied from interface: MetaParam.Lookup
      Returns a non-empty Optional instance containing a metadata parameter instance that can be assigned to the type Class passed in, or an empty Optional if no metadata can be assigned to that type.
      Specified by:
      findMetaParam in interface MetaParam.Lookup
      Type Parameters:
      T - metadata parameter type
    • isEmpty

      public boolean isEmpty()
    • toString

      public String toString()
      toString in class Object
    • equals

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

      public int hashCode()
      hashCode in class Object
    • getBuilder

    • empty

      public static MetaParamsInternalMetadata empty()