Class ObjectPlanHash

  • All Implemented Interfaces:
    PlanHashable, QueryHashable

    public class ObjectPlanHash
    extends Object
    implements PlanHashable, QueryHashable
    This class implements a planHash for the member classes of the query plan. As it is required to separate the plan hashes of various structures in the plan model, we need a way to tell each member of the model apart. Using this class we can implement a stable (withstand JVM restart and class refactorings) base hash for each object that can be added to the rest of the plan.
    • Constructor Detail

    • Method Detail

      • planHash

        public int planHash​(@Nonnull
                            PlanHashable.PlanHashKind hashKind)
        Description copied from interface: PlanHashable
        Return a hash similar to hashCode, but with the additional guarantee that is is stable across JVMs.
        Specified by:
        planHash in interface PlanHashable
        Parameters:
        hashKind - the "kind" of hash to calculate. Each kind of hash has a particular logic with regards to included and excluded items.
        Returns:
        a stable hash code
      • queryHash

        public int queryHash​(@Nonnull
                             QueryHashable.QueryHashKind hashKind)
        Description copied from interface: QueryHashable
        Return a hash similar to hashCode, but with the additional guarantee that is is stable across JVMs.
        Specified by:
        queryHash in interface QueryHashable
        Parameters:
        hashKind - the "kind" of hash to calculate. Each kind of hash has a particular logic with regards to included and excluded items.
        Returns:
        a stable hash code