Record Class MutationAttempt
java.lang.Object
java.lang.Record
org.apache.polaris.persistence.nosql.metastore.mutation.MutationAttempt
public record MutationAttempt(UpdateKeyForCatalogAndEntityType updateKeyForCatalogAndEntityType, List<EntityUpdate> updates, org.apache.polaris.persistence.nosql.api.commit.CommitterState<? extends org.apache.polaris.persistence.nosql.coretypes.ContainerObj,MutationResults> state, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.obj.ObjRef> byName, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.index.IndexKey> byId, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.changes.Change> changes, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.catalog.EntityIdSet> locations, MemoizedIndexedAccess memoizedIndexedAccess)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMutationAttempt(UpdateKeyForCatalogAndEntityType updateKeyForCatalogAndEntityType, List<EntityUpdate> updates, org.apache.polaris.persistence.nosql.api.commit.CommitterState<? extends org.apache.polaris.persistence.nosql.coretypes.ContainerObj, MutationResults> state, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.obj.ObjRef> byName, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.index.IndexKey> byId, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.changes.Change> changes, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.catalog.EntityIdSet> locations, MemoizedIndexedAccess memoizedIndexedAccess) Creates an instance of aMutationAttemptrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapply()org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.index.IndexKey> byId()Returns the value of thebyIdrecord component.org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.obj.ObjRef> byName()Returns the value of thebyNamerecord component.org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.changes.Change> changes()Returns the value of thechangesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.catalog.EntityIdSet> Returns the value of thelocationsrecord component.Returns the value of thememoizedIndexedAccessrecord component.static org.apache.polaris.persistence.nosql.coretypes.ObjBaseobjForChangeComparison(org.apache.polaris.core.entity.PolarisBaseEntity entity, Optional<org.apache.polaris.core.entity.PolarisPrincipalSecrets> currentSecrets, org.apache.polaris.persistence.nosql.coretypes.ObjBase originalObj) Produces an obj instance that can be used to detect whether an update operation results in an actual change or a noop.org.apache.polaris.persistence.nosql.api.commit.CommitterState<? extends org.apache.polaris.persistence.nosql.coretypes.ContainerObj, MutationResults> state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdateKeyForCatalogAndEntityTyperecord component.static voidupdateLocationsIndex(org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.catalog.EntityIdSet> locations, org.apache.polaris.persistence.nosql.coretypes.ObjBase originalObj, org.apache.polaris.persistence.nosql.coretypes.ObjBase entityObj) updates()Returns the value of theupdatesrecord component.
-
Constructor Details
-
MutationAttempt
public MutationAttempt(UpdateKeyForCatalogAndEntityType updateKeyForCatalogAndEntityType, List<EntityUpdate> updates, org.apache.polaris.persistence.nosql.api.commit.CommitterState<? extends org.apache.polaris.persistence.nosql.coretypes.ContainerObj, MutationResults> state, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.obj.ObjRef> byName, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.index.IndexKey> byId, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.changes.Change> changes, org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.catalog.EntityIdSet> locations, MemoizedIndexedAccess memoizedIndexedAccess) Creates an instance of aMutationAttemptrecord class.- Parameters:
updateKeyForCatalogAndEntityType- the value for theupdateKeyForCatalogAndEntityTyperecord componentupdates- the value for theupdatesrecord componentstate- the value for thestaterecord componentbyName- the value for thebyNamerecord componentbyId- the value for thebyIdrecord componentchanges- the value for thechangesrecord componentlocations- the value for thelocationsrecord componentmemoizedIndexedAccess- the value for thememoizedIndexedAccessrecord component
-
-
Method Details
-
objForChangeComparison
public static org.apache.polaris.persistence.nosql.coretypes.ObjBase objForChangeComparison(org.apache.polaris.core.entity.PolarisBaseEntity entity, Optional<org.apache.polaris.core.entity.PolarisPrincipalSecrets> currentSecrets, org.apache.polaris.persistence.nosql.coretypes.ObjBase originalObj) Produces an obj instance that can be used to detect whether an update operation results in an actual change or a noop. For this, the entity is mapped to an object, but the technical attributes are taken from the existing object. -
apply
-
updateLocationsIndex
public static void updateLocationsIndex(org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.catalog.EntityIdSet> locations, org.apache.polaris.persistence.nosql.coretypes.ObjBase originalObj, org.apache.polaris.persistence.nosql.coretypes.ObjBase entityObj) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
updateKeyForCatalogAndEntityType
Returns the value of theupdateKeyForCatalogAndEntityTyperecord component.- Returns:
- the value of the
updateKeyForCatalogAndEntityTyperecord component
-
updates
Returns the value of theupdatesrecord component.- Returns:
- the value of the
updatesrecord component
-
state
public org.apache.polaris.persistence.nosql.api.commit.CommitterState<? extends org.apache.polaris.persistence.nosql.coretypes.ContainerObj,MutationResults> state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
byName
public org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.obj.ObjRef> byName()Returns the value of thebyNamerecord component.- Returns:
- the value of the
byNamerecord component
-
byId
public org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.api.index.IndexKey> byId()Returns the value of thebyIdrecord component.- Returns:
- the value of the
byIdrecord component
-
changes
public org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.changes.Change> changes()Returns the value of thechangesrecord component.- Returns:
- the value of the
changesrecord component
-
locations
public org.apache.polaris.persistence.nosql.api.index.UpdatableIndex<org.apache.polaris.persistence.nosql.coretypes.catalog.EntityIdSet> locations()Returns the value of thelocationsrecord component.- Returns:
- the value of the
locationsrecord component
-
memoizedIndexedAccess
Returns the value of thememoizedIndexedAccessrecord component.- Returns:
- the value of the
memoizedIndexedAccessrecord component
-