Package io.trino.spi

Interface Mergeable<T>

All Known Subinterfaces:
Count<T>, Distribution<T>, Metric<T>, Timing<T>
All Known Implementing Classes:
Metrics

public interface Mergeable<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    mergeWith(List<T> others)
     
    mergeWith(T other)
    Merges the current state with the state of the other instance, and returns the merged state.
  • Method Details

    • mergeWith

      T mergeWith(T other)
      Merges the current state with the state of the other instance, and returns the merged state.
      Throws:
      NullPointerException - if other is null
    • mergeWith

      default T mergeWith(List<T> others)