Class EmbeddedMetadata

java.lang.Object
org.infinispan.metadata.EmbeddedMetadata
All Implemented Interfaces:
Metadata
Direct Known Subclasses:
EmbeddedMetadata.EmbeddedExpirableMetadata, EmbeddedMetadata.EmbeddedLifespanExpirableMetadata, EmbeddedMetadata.EmbeddedMaxIdleExpirableMetadata

@ProtoTypeId(4) public class EmbeddedMetadata extends Object implements Metadata
Metadata class for embedded caches.
Since:
5.3
Author:
Galder ZamarreƱo
  • Field Details

  • Method Details

    • lifespan

      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
      Returns:
      lifespan of the entry in number of milliseconds
    • maxIdle

      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
      Returns:
      maximum idle time of the entry in number of milliseconds
    • 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
      Returns:
      version of the entry
    • getNumericVersion

      @ProtoField(1) public NumericVersion getNumericVersion()
    • getClusteredVersion

      @ProtoField(2) public SimpleClusteredVersion getClusteredVersion()
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Metadata
      Returns whether this metadata is effectively empty, that is that persisting or replicating it to another node would be no different then sending a null metadata object.
      Specified by:
      isEmpty in interface Metadata
      Returns:
      if this metadata has no actual data to store
    • builder

      public Metadata.Builder 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
      Returns:
      instance of Metadata.Builder
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object