Record Class WanMerkleTree.WanMerkleDiff
java.lang.Object
java.lang.Record
com.loomcache.server.wan.WanMerkleTree.WanMerkleDiff
- Enclosing class:
WanMerkleTree
public static record WanMerkleTree.WanMerkleDiff(@NonNull String localRootHash, @NonNull String remoteRootHash, @NonNull List<Integer> differingBuckets, @NonNull List<WanMerkleTree.WanKey> keysToUpsert, @NonNull List<WanMerkleTree.WanKey> keysToDelete)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionWanMerkleDiff(@NonNull String localRootHash, @NonNull String remoteRootHash, @NonNull List<Integer> differingBuckets, @NonNull List<WanMerkleTree.WanKey> keysToUpsert, @NonNull List<WanMerkleTree.WanKey> keysToDelete) Creates an instance of aWanMerkleDiffrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedifferingBucketsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()@NonNull List<WanMerkleTree.WanKey> Returns the value of thekeysToDeleterecord component.@NonNull List<WanMerkleTree.WanKey> Returns the value of thekeysToUpsertrecord component.@NonNull StringReturns the value of thelocalRootHashrecord component.@NonNull StringReturns the value of theremoteRootHashrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WanMerkleDiff
public WanMerkleDiff(@NonNull String localRootHash, @NonNull String remoteRootHash, @NonNull List<Integer> differingBuckets, @NonNull List<WanMerkleTree.WanKey> keysToUpsert, @NonNull List<WanMerkleTree.WanKey> keysToDelete) Creates an instance of aWanMerkleDiffrecord class.- Parameters:
localRootHash- the value for thelocalRootHashrecord componentremoteRootHash- the value for theremoteRootHashrecord componentdifferingBuckets- the value for thedifferingBucketsrecord componentkeysToUpsert- the value for thekeysToUpsertrecord componentkeysToDelete- the value for thekeysToDeleterecord component
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
localRootHash
Returns the value of thelocalRootHashrecord component.- Returns:
- the value of the
localRootHashrecord component
-
remoteRootHash
Returns the value of theremoteRootHashrecord component.- Returns:
- the value of the
remoteRootHashrecord component
-
differingBuckets
-
keysToUpsert
Returns the value of thekeysToUpsertrecord component.- Returns:
- the value of the
keysToUpsertrecord component
-
keysToDelete
Returns the value of thekeysToDeleterecord component.- Returns:
- the value of the
keysToDeleterecord component
-