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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Conservative limit for serialized policy-mapping index value size to ensure that the serialized index-entry value sizes don't grow too large.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 a PolicyMutation record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.polaris.core.persistence.dao.entity.PolicyAttachmentResult
     
    boolean
    Returns the value of the doAttach record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the memoizedIndexedAccess record component.
    @NonNull Map<String,String>
    Returns the value of the parameters record component.
    org.apache.polaris.persistence.nosql.api.Persistence
    Returns the value of the persistence record component.
    long
    Returns the value of the policyCatalogId record component.
    long
    Returns the value of the policyId record component.
    @NonNull org.apache.polaris.core.policy.PolicyType
    Returns the value of the policyType record component.
    long
    Returns the value of the targetCatalogId record component.
    long
    Returns the value of the targetId record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • MAX_POLICY_MAPPING_INDEX_VALUE_SIZE

      public static final int MAX_POLICY_MAPPING_INDEX_VALUE_SIZE
      Conservative 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 a PolicyMutation record class.
      Parameters:
      persistence - the value for the persistence record component
      memoizedIndexedAccess - the value for the memoizedIndexedAccess record component
      policyCatalogId - the value for the policyCatalogId record component
      policyId - the value for the policyId record component
      policyType - the value for the policyType record component
      targetCatalogId - the value for the targetCatalogId record component
      targetId - the value for the targetId record component
      doAttach - the value for the doAttach record component
      parameters - the value for the parameters record component
  • Method Details

    • apply

      public org.apache.polaris.core.persistence.dao.entity.PolicyAttachmentResult apply()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • persistence

      public org.apache.polaris.persistence.nosql.api.Persistence persistence()
      Returns the value of the persistence record component.
      Returns:
      the value of the persistence record component
    • memoizedIndexedAccess

      public MemoizedIndexedAccess memoizedIndexedAccess()
      Returns the value of the memoizedIndexedAccess record component.
      Returns:
      the value of the memoizedIndexedAccess record component
    • policyCatalogId

      public long policyCatalogId()
      Returns the value of the policyCatalogId record component.
      Returns:
      the value of the policyCatalogId record component
    • policyId

      public long policyId()
      Returns the value of the policyId record component.
      Returns:
      the value of the policyId record component
    • policyType

      public @NonNull org.apache.polaris.core.policy.PolicyType policyType()
      Returns the value of the policyType record component.
      Returns:
      the value of the policyType record component
    • targetCatalogId

      public long targetCatalogId()
      Returns the value of the targetCatalogId record component.
      Returns:
      the value of the targetCatalogId record component
    • targetId

      public long targetId()
      Returns the value of the targetId record component.
      Returns:
      the value of the targetId record component
    • doAttach

      public boolean doAttach()
      Returns the value of the doAttach record component.
      Returns:
      the value of the doAttach record component
    • parameters

      public @NonNull Map<String,String> parameters()
      Returns the value of the parameters record component.
      Returns:
      the value of the parameters record component