|
GemFire 6.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PartitionResolver<K,V>
Implementers of interface PartitionResolver enable custom
partitioning on the PartitionedRegion.
1. The Key class or callback arg can implement PartitionResolver interface to
enable custom partitioning OR
2. Configure your own PartitionResolver class in partition attributes (For
instance when the Key is a primitive type or String) Implement the
appropriate equals
GemFire uses the routing object's hashCode to determine where the data is being managed. Say, for example, you want to colocate all Trades by month and year.The key is implemented by TradeKey class which also implements the PartitionResolver interface.
public class TradeKey implements PartitionResolver {
| Method Summary | |
|---|---|
String |
getName()
Returns the name of the PartitionResolver |
Serializable |
getRoutingObject(EntryOperation<K,V> opDetails)
|
| Methods inherited from interface com.gemstone.gemfire.cache.CacheCallback |
|---|
close |
| Method Detail |
|---|
Serializable getRoutingObject(EntryOperation<K,V> opDetails)
opDetails - the detail of the entry operation e.g.
Region.get(Object)
RuntimeException - any exception thrown will terminate the operation and the
exception will be passed to the calling thread.String getName()
|
GemFire 6.0.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||