Class ShardingMetadata


  • public class ShardingMetadata
    extends Object
    Holds the Sharded Database metadata that is required during encoding and decoding of sharding keys. The metadata is normally populated after the first connection to the database is established. The metadata object is designed to be immutable once created.
    • Field Detail

      • SUPER_SHARDING_KEY_LEVEL

        public static final int SUPER_SHARDING_KEY_LEVEL
        See Also:
        Constant Field Values
    • Constructor Detail

      • ShardingMetadata

        public ShardingMetadata​(int version,
                                ShardingMetadata.ShardingType shardingType,
                                ShardingMetadata.ShardingType superShardingType,
                                List<ShardingMetadata.SubKeyMetadata> keyColumns,
                                List<ShardingMetadata.SubKeyMetadata> superKeyColumns)
        Constructs an immutable object with all the metadata information.
        Parameters:
        version - version of the metadata object being built
        shardingType - sharding type in the database
        superShardingType - super sharding type in the database
        keyColumns - sub key column metadata for sharding sub keys on the database
        superKeyColumns - sub key column metadata for sub keys of the super sharding key on the database