GemFire 6.5

Package com.gemstone.gemfire.cache.partition

Provides classes which operate on partitioned regions.


Interface Summary
PartitionListener A callback for partitioned regions, invoked when a partition region is created or any bucket in a partitioned region becomes primary

A sample implementation of this interface to colocate partition regions using a primary key without having to honour the redundancy contract for every colocate partition regions is as follows :
public class ColocatingPartitionListener implements PartitionListener, Declarable { private Cache cache; private List<String> viewRegionNames = new ArrayList<String>(); public ColocatingPartitionListener() { } public void afterPrimary(int bucketId) { for (String viewRegionName : viewRegionNames) { Region viewRegion = cache.getRegion(viewRegionName); PartitionManager.createPrimaryBucket(viewRegion, bucketId, true, true); } } public void init(Properties props) { String viewRegions = props.getProperty("viewRegions"); StringTokenizer tokenizer = new StringTokenizer(viewRegions, ","); while (tokenizer.hasMoreTokens()) { viewRegionNames.add(tokenizer.nextToken()); } } public void afterRegionCreate(Region<?
PartitionMemberInfo Describes a member that has been configured to provide storage space for a partitioned region.
PartitionRebalanceInfo The detailed results of rebalancing a partitioned region.
PartitionRegionInfo Information describing the data storage and distribution of a partitioned region.

Class Summary
PartitionManager An utility class to manage partitions (aka buckets) on a Partitioned Region without requiring data (e.g. keys).
PartitionRegionHelper Utility methods for handling partitioned Regions, for example during execution of Functions on a Partitioned Region.

Package com.gemstone.gemfire.cache.partition Description

Provides classes which operate on partitioned regions. PartitionRegionHelper contains static methods which can be used to extract partition region specific information from a region.

GemFire 6.5

Copyright © 2002-2010 GemStone Systems, Inc. All Rights Reserved.