GemFire 7.0

com.gemstone.gemfire.cache
Class FixedPartitionAttributes

java.lang.Object
  extended by com.gemstone.gemfire.cache.FixedPartitionAttributes

public abstract class FixedPartitionAttributes
extends Object

This abstract class represents attributes that define the characteristics of a partition in a Fixed Partitioned Region.

FixedPartitionAttributes are created using the createFixedPartition(String) createFixedPartition(String, boolean) createFixedPartition(String, int) createFixedPartition(String, boolean, int)

PartitionAttributes.getFixedPartitionAttributes() discovers all fixed partitions in Partitioned Region attributes.

PartitionAttributesFactory.addFixedPartitionAttributes(FixedPartitionAttributes) configures FixedPartitionAttributes in Partitioned Region Attributes

Since:
6.6
See Also:
PartitionAttributes, PartitionAttributesFactory

Constructor Summary
FixedPartitionAttributes()
           
 
Method Summary
static FixedPartitionAttributes createFixedPartition(String name)
          This method creates FixedPartitionAttributes with partition name provided.
static FixedPartitionAttributes createFixedPartition(String name, boolean isPrimary)
          This method creates FixedPartitionAttributes with partition name and primary status.
static FixedPartitionAttributes createFixedPartition(String name, boolean isPrimary, int numBuckets)
          This method creates FixedPartitionAttributes with partition name, primaryStatus and partition number of buckets.
static FixedPartitionAttributes createFixedPartition(String name, int numBuckets)
          This method creates FixedPartitionAttributes with partition name and partition number of buckets .
abstract  int getNumBuckets()
          This method returns the number of the buckets allowed for this partition
abstract  String getPartitionName()
          The name of the fixed partition defined on the region
abstract  boolean isPrimary()
          This method returns whether the partition defined is primary or secondary
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedPartitionAttributes

public FixedPartitionAttributes()
Method Detail

createFixedPartition

public static final FixedPartitionAttributes createFixedPartition(String name)
This method creates FixedPartitionAttributes with partition name provided. This method call sets other attributes to default. isPrimary = false numBuckets = 1

Parameters:
name - represent the name of the partition

createFixedPartition

public static final FixedPartitionAttributes createFixedPartition(String name,
                                                                  boolean isPrimary)
This method creates FixedPartitionAttributes with partition name and primary status. This method call sets other attribute to default. numBuckets = 1

Parameters:
name - represent the name of the partition
isPrimary - status of the partition.

createFixedPartition

public static final FixedPartitionAttributes createFixedPartition(String name,
                                                                  boolean isPrimary,
                                                                  int numBuckets)
This method creates FixedPartitionAttributes with partition name, primaryStatus and partition number of buckets.

Parameters:
name - represent the name of the partition
isPrimary - status of the partition
numBuckets - represents the number of buckets allowed for this partition

createFixedPartition

public static final FixedPartitionAttributes createFixedPartition(String name,
                                                                  int numBuckets)
This method creates FixedPartitionAttributes with partition name and partition number of buckets . This method call sets other attributes to default. isPrimary = false

Parameters:
name - represent the name of the partition
numBuckets - represents the number of buckets allowed for this partition

getPartitionName

public abstract String getPartitionName()
The name of the fixed partition defined on the region

Returns:
partitionName.

isPrimary

public abstract boolean isPrimary()
This method returns whether the partition defined is primary or secondary

Returns:
primary status.

getNumBuckets

public abstract int getNumBuckets()
This method returns the number of the buckets allowed for this partition

Returns:
number of the buckets for the partition

GemFire 7.0

Copyright © 1997-2012 VMware, Inc. All rights reserved.