Class Metadatas

java.lang.Object
org.infinispan.metadata.Metadatas

public class Metadatas extends Object
Utility method for Metadata classes.
Since:
5.3
Author:
Galder ZamarreƱo
  • Method Details

    • applyVersion

      public static Metadata applyVersion(Metadata source, Metadata target)
      Applies version in source metadata to target metadata, if no version in target metadata. This method can be useful in scenarios where source version information must be kept around, i.e. write skew, or when reading metadata from cache store.
      Parameters:
      source - Metadata object which is source, whose version might be is of interest for the target metadata
      target - Metadata object on which version might be applied
      Returns:
      either, the target Metadata instance as it was when it was called, or a brand new target Metadata instance with version from source metadata applied.
    • updateMetadata

      public static void updateMetadata(CacheEntry entry, Metadata providedMetadata)
      Set the providedMetadata on the cache entry. If the entry already has a version, copy the version in the new metadata.