Open
Conversation
added 5 commits
January 13, 2026 18:34
shivangi219
reviewed
Mar 15, 2026
|
|
||
| @Builder | ||
| @Getter | ||
| public class BucketKeyInfo { |
shivangi219
reviewed
Mar 15, 2026
| @Builder | ||
| @Getter | ||
| public class BucketKeyInfo { | ||
| private int value; |
Contributor
There was a problem hiding this comment.
we should give key also in response.
shivangi219
reviewed
Mar 15, 2026
| import java.util.Map; | ||
| import java.util.Objects; | ||
|
|
||
| public class BucketKeyReader<T> { |
Contributor
There was a problem hiding this comment.
rename to BucketResolver
shivangi219
reviewed
Mar 15, 2026
| this.initialisedEntitiesMeta = initialisedEntitiesMeta; | ||
| } | ||
|
|
||
| public <U> BucketKeyInfo getBucketId(final String tenantId, |
shivangi219
reviewed
Mar 15, 2026
| return null; | ||
| } | ||
|
|
||
| if (Objects.isNull(bucketIdExtractor)) { |
Contributor
There was a problem hiding this comment.
this is already checked during initialization
shivangi219
reviewed
Mar 15, 2026
| final var shardingKeyFieldEntry = fetchAndValidateAnnotateField(clazz, ShardingKey.class, String.class); | ||
| final var shardingKeyField = shardingKeyFieldEntry.map(Map.Entry::getKey); | ||
| final var lookupKeyField = lookupKeyFieldEntry.map(Map.Entry::getKey); | ||
|
|
Contributor
There was a problem hiding this comment.
rename these to shardingKeyFieldOptional and lookupKeyFieldOptional
shivangi219
reviewed
Mar 15, 2026
| final var shardingKeyFieldDeclaringClassLookup = | ||
| MethodHandles.privateLookupIn(shardingKeyFieldEntry.get().getValue(), MethodHandles.lookup()); | ||
| shardingKeyGetter = shardingKeyFieldDeclaringClassLookup.unreflectGetter(shardingKeyField.get()); | ||
| final var shardingKeyFieldData = shardingKeyField.get(); |
Contributor
There was a problem hiding this comment.
rename to shardingKeyField and lookupKeyFiel
shivangi219
reviewed
Mar 15, 2026
| Thread.currentThread().interrupt(); | ||
| } | ||
| } | ||
| }); |
Contributor
There was a problem hiding this comment.
registerBucketIdExtractor should be here, once all tenants are initialised
shivangi219
reviewed
Mar 15, 2026
| return Collections.unmodifiableMap(this.initialisedEntitiesMeta); | ||
| } | ||
|
|
||
| public BucketKeyReader<String> getBucketKeyReader() { |
Contributor
There was a problem hiding this comment.
should this be public?
added 4 commits
March 16, 2026 07:45
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.