Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMap partition-key strategy #779

Closed
pveentjer opened this issue Aug 24, 2013 · 1 comment
Closed

IMap partition-key strategy #779

pveentjer opened this issue Aug 24, 2013 · 1 comment
Labels
Source: Internal PR or issue was opened by an employee Type: Enhancement
Milestone

Comments

@pveentjer
Copy link
Contributor

There is some control to determine the correct partition of a IMap key:

  1. if it implement PartitionAware the binary format of the getPartitionKey will be used to determine the partition
  2. if it doesn't, the binary format of the key is used.

It would be nice if there would be a PartitionStrategy that can be inserted in the map:

interface PartitionStrategy<K>{
    Object getPartitionKey(K k);
}

The default implementation can behave like what we have now; if the key implement partition aware then use that otherwise use key itself.

But a user can also provide his own partitionstrategy; he could for example have a partitionstrategy that relies on e.g. foo@hazelcast

So with this PartitionStrategy we can easily provide the functionality which is there and if nothing configured explicitly by the user than the system will behave like it always has. But the user can also inject his own partition strategy.

@mdogan
Copy link
Contributor

mdogan commented Sep 17, 2013

Fixed by commit; 1ec1558

@mdogan mdogan closed this as completed Sep 17, 2013
@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Jan 28, 2020
devOpsHazelcast pushed a commit that referenced this issue Feb 15, 2024
…1.8.0 to 1.8.1 (#779)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
GitOrigin-RevId: 47a4ffe1d0ca51e3fc97f90d521a8fc0aa165321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Internal PR or issue was opened by an employee Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants