Record Class PolicyMutation
java.lang.Object
java.lang.Record
org.apache.polaris.persistence.nosql.metastore.mutation.PolicyMutation
public record PolicyMutation(org.apache.polaris.persistence.nosql.api.Persistence persistence, MemoizedIndexedAccess memoizedIndexedAccess, long policyCatalogId, long policyId, @NonNull org.apache.polaris.core.policy.PolicyType policyType, long targetCatalogId, long targetId, boolean doAttach, @NonNull Map<String,String> parameters)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConservative limit for serialized policy-mapping index value size to ensure that the serialized index-entry value sizes don't grow too large. -
Constructor Summary
ConstructorsConstructorDescriptionPolicyMutation(org.apache.polaris.persistence.nosql.api.Persistence persistence, MemoizedIndexedAccess memoizedIndexedAccess, long policyCatalogId, long policyId, @NonNull org.apache.polaris.core.policy.PolicyType policyType, long targetCatalogId, long targetId, boolean doAttach, @NonNull Map<String, String> parameters) Creates an instance of aPolicyMutationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.polaris.core.persistence.dao.entity.PolicyAttachmentResultapply()booleandoAttach()Returns the value of thedoAttachrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thememoizedIndexedAccessrecord component.Returns the value of theparametersrecord component.org.apache.polaris.persistence.nosql.api.PersistenceReturns the value of thepersistencerecord component.longReturns the value of thepolicyCatalogIdrecord component.longpolicyId()Returns the value of thepolicyIdrecord component.@NonNull org.apache.polaris.core.policy.PolicyTypeReturns the value of thepolicyTyperecord component.longReturns the value of thetargetCatalogIdrecord component.longtargetId()Returns the value of thetargetIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MAX_POLICY_MAPPING_INDEX_VALUE_SIZE
public static final int MAX_POLICY_MAPPING_INDEX_VALUE_SIZEConservative limit for serialized policy-mapping index value size to ensure that the serialized index-entry value sizes don't grow too large.If this limit is ever exceeded, there are two options:
- If it's a marginal increase, it's possible to increase this value.
- If the property bag is becoming too big, the policy mapping should be stored in a
separate new
Object.
- See Also:
-
-
Constructor Details
-
PolicyMutation
public PolicyMutation(org.apache.polaris.persistence.nosql.api.Persistence persistence, MemoizedIndexedAccess memoizedIndexedAccess, long policyCatalogId, long policyId, @NonNull org.apache.polaris.core.policy.PolicyType policyType, long targetCatalogId, long targetId, boolean doAttach, @NonNull Map<String, String> parameters) Creates an instance of aPolicyMutationrecord class.- Parameters:
persistence- the value for thepersistencerecord componentmemoizedIndexedAccess- the value for thememoizedIndexedAccessrecord componentpolicyCatalogId- the value for thepolicyCatalogIdrecord componentpolicyId- the value for thepolicyIdrecord componentpolicyType- the value for thepolicyTyperecord componenttargetCatalogId- the value for thetargetCatalogIdrecord componenttargetId- the value for thetargetIdrecord componentdoAttach- the value for thedoAttachrecord componentparameters- the value for theparametersrecord component
-
-
Method Details
-
apply
public org.apache.polaris.core.persistence.dao.entity.PolicyAttachmentResult apply() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
persistence
public org.apache.polaris.persistence.nosql.api.Persistence persistence()Returns the value of thepersistencerecord component.- Returns:
- the value of the
persistencerecord component
-
memoizedIndexedAccess
Returns the value of thememoizedIndexedAccessrecord component.- Returns:
- the value of the
memoizedIndexedAccessrecord component
-
policyCatalogId
public long policyCatalogId()Returns the value of thepolicyCatalogIdrecord component.- Returns:
- the value of the
policyCatalogIdrecord component
-
policyId
public long policyId()Returns the value of thepolicyIdrecord component.- Returns:
- the value of the
policyIdrecord component
-
policyType
public @NonNull org.apache.polaris.core.policy.PolicyType policyType()Returns the value of thepolicyTyperecord component.- Returns:
- the value of the
policyTyperecord component
-
targetCatalogId
public long targetCatalogId()Returns the value of thetargetCatalogIdrecord component.- Returns:
- the value of the
targetCatalogIdrecord component
-
targetId
public long targetId()Returns the value of thetargetIdrecord component.- Returns:
- the value of the
targetIdrecord component
-
doAttach
public boolean doAttach()Returns the value of thedoAttachrecord component.- Returns:
- the value of the
doAttachrecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-