Package oracle.jdbc.pool
Class ShardingMetadata
java.lang.Object
oracle.jdbc.pool.ShardingMetadata
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enum to hold the different sharding methods supported for shard keys and shard groups in the Oracle sharded database.static class
Holds the shard sub key metadata information extracted from the database. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionShardingMetadata
(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. -
Method Summary
Modifier and TypeMethodDescriptionint
-
Field Details
-
SUPER_SHARDING_KEY_LEVEL
public static final int SUPER_SHARDING_KEY_LEVEL- See Also:
-
SHARDING_KEY_LEVEL
public static final int SHARDING_KEY_LEVEL- See Also:
-
-
Constructor Details
-
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 builtshardingType
- sharding type in the databasesuperShardingType
- super sharding type in the databasekeyColumns
- sub key column metadata for sharding sub keys on the databasesuperKeyColumns
- sub key column metadata for sub keys of the super sharding key on the database
-
-
Method Details
-
getVersion
public int getVersion()- Returns:
- version of this metadata
-
getShardingType
- Returns:
- sharding type in the metadata
-
getSuperShardingType
- Returns:
- super sharding type in the metadata
-
getShardingKeyColumns
- Returns:
- list of sharding sub key column metadata
-
getSuperShardingKeyColumns
- Returns:
- list of super sharding sub key columns metadata
-