Class Metadatas

  • public class Metadatas
    extends Object
    Utility method for Metadata classes.
    Galder ZamarreƱo
    • Method Detail

      • 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.
        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
        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​(org.infinispan.container.entries.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.