|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface KeyPartitioningStrategy
A KeyPartitioningStrategy is a pluggable strategy for assigning keys to specific partitions.
Note: as of Coherence 3.6 the contract of the getKeyPartition method has changed and should take into consideration the service's key associator.
| Nested Class Summary | |
|---|---|
static interface |
KeyPartitioningStrategy.PartitionAwareKeyPartitionAwareKey is a well-known interface that should be respected by KeyPartitioningStrategy implementations. |
| Method Summary | |
|---|---|
PartitionSet |
getAssociatedPartitions(java.lang.Object oKey)Determine the set of partitions that all keys associated with the specified key are assigned to. |
int |
getKeyPartition(java.lang.Object oKey)Determine the partition to which a particular key should be assigned. |
void |
init(PartitionedService service)Initialize the KeyPartitioningStrategy and bind it to the specified PartitionedService. |
| Method Detail |
|---|
void init(PartitionedService service)
service - the PartitionedService that this strategy is being bound toint getKeyPartition(java.lang.Object oKey)
In general, implementations are expected to respect the associations provided by the service's KeyAssociator in such a way that keys that return the same associated key would be assigned to the same partition. Furthermore, implementations are also expected to respect explicit partition-assignments dictated by the KeyPartitioningStrategy.PartitionAwareKey interface. Naturally, those two interfaces should not be combined for a given key.
The resulting partition must be in the range [0..N-1], where N is the value returned from PartitionedService.getPartitionCount().
oKey - a key in its Object formPartitionedService.getPartitionOwner(int)PartitionSet getAssociatedPartitions(java.lang.Object oKey)
getKeyPartition method.oKey - a key in its Object form
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||