Package com.apple.foundationdb.record
Class ObjectPlanHash
java.lang.Object
com.apple.foundationdb.record.ObjectPlanHash
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.PlanHashable
PlanHashable.PlanHashKind, PlanHashable.PlanHashMode
Nested classes/interfaces inherited from interface com.apple.foundationdb.record.QueryHashable
QueryHashable.QueryHashKind
-
Field Summary
Fields inherited from interface com.apple.foundationdb.record.PlanHashable
CURRENT_FOR_CONTINUATION, CURRENT_LEGACY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
int
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.int
queryHash
(QueryHashable.QueryHashKind hashKind) Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.apple.foundationdb.record.PlanHashable
planHash, planHash
-
Constructor Details
-
ObjectPlanHash
-
-
Method Details
-
planHash
Description copied from interface:PlanHashable
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.- Specified by:
planHash
in interfacePlanHashable
- Parameters:
mode
- the "mode" of hash to calculate. Each mode contains a hash kind which has a particular logic with regards to included and excluded items. It is also versioned to support for the evolution of the plan hash when the underlying plan objects evolve- Returns:
- a stable hash code
-
queryHash
Description copied from interface:QueryHashable
Return a hash similar tohashCode
, but with the additional guarantee that is is stable across JVMs.- Specified by:
queryHash
in interfaceQueryHashable
- 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
-
hashCode
public int hashCode() -
equals
-
toString
-