Gemfire JavaDocs
Package org.apache.geode.cache
Interface PartitionAttributes<K,V>
-
public interface PartitionAttributes<K,V>
Attributes that define the partitioned character of a Partitioned Region. This interface allows for the discovery of Partitioned Region attributes usingRegionAttributes.getPartitionAttributes()
as well as the configuration of a Partitioned Region usingAttributesFactory.setPartitionAttributes(PartitionAttributes)
. PartitionAttributes are created using thePartitionAttributesFactory
The default PartitionAttributes can be determined usingPartitionAttributesFactory.create()
with out calling any of its mutator methods e.g.PartitionAttributesFactory.setLocalMaxMemory(int)
Also seeDataPolicy.PARTITION
.- Since:
- GemFire 5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default RegionAttributesType.PartitionAttributes
convertToConfigPartitionAttributes()
java.lang.String
getColocatedWith()
Returns the colocated PartitionedRegion's namejava.util.List<FixedPartitionAttributes>
getFixedPartitionAttributes()
ReturnsFixedPartitionAttributes
's list of local partitions defined on this Partitioned Regionjava.util.Properties
getGlobalProperties()
Deprecated.usegetTotalMaxMemory()
andgetTotalNumBuckets()
in GemFire 5.1 and later releasesint
getLocalMaxMemory()
This method returns the maximum amount of local memory that can be used by the Region.java.util.Properties
getLocalProperties()
Deprecated.usegetLocalMaxMemory()
in GemFire 5.1 and later releasesPartitionListener[]
getPartitionListeners()
Returns array of PartitionListener{s} configured on this partitioned regionPartitionResolver<K,V>
getPartitionResolver()
Returns the PartitionResolver set for custom partitioninglong
getRecoveryDelay()
Returns the delay in milliseconds that existing members will wait before satisfying redundancy after another member crashes.int
getRedundantCopies()
The number of Backups for an entry in PartitionedRegion.long
getStartupRecoveryDelay()
Returns the delay in milliseconds that a new member will wait before trying to satisfy redundancy of data hosted on other members.long
getTotalMaxMemory()
Deprecated.since Geode 1.3.0int
getTotalNumBuckets()
This method returns total number of buckets for a PartitionedRegion.long
getTotalSize()
Deprecated.use getTotalMaxMemory() instead
-
-
-
Method Detail
-
getRedundantCopies
int getRedundantCopies()
The number of Backups for an entry in PartitionedRegion. This value should be between 0 and 3 (for a total of 1 to 4 instances of the data). The default value is 0.- Returns:
- redundantCopies.
-
getTotalSize
@Deprecated long getTotalSize()
Deprecated.use getTotalMaxMemory() insteadThis method returns the maximum total size of the region in megabytes.- Returns:
- total size in megabytes.
-
getTotalMaxMemory
@Deprecated long getTotalMaxMemory()
Deprecated.since Geode 1.3.0This method returns the maximum total size of the region, in megabytes. Default value is Integer.MAX_VALUE.- Returns:
- maximum size of the partitioned region, in megabytes
-
getTotalNumBuckets
int getTotalNumBuckets()
This method returns total number of buckets for a PartitionedRegion. Default number of buckets for a PartitionedRegion is 113.- Returns:
- total number of buckets for a PartitionedRegion.
-
getLocalMaxMemory
int getLocalMaxMemory()
This method returns the maximum amount of local memory that can be used by the Region. By default, a PartitionedRegion can contribute 90% of the maximum memory allocated to a VM.- Returns:
- the maximum amount of local memory that can be used by the Region
-
getColocatedWith
java.lang.String getColocatedWith()
Returns the colocated PartitionedRegion's name- Returns:
- the colocated PartitionedRegion's name
- Since:
- GemFire 6.0
-
getLocalProperties
@Deprecated java.util.Properties getLocalProperties()
Deprecated.usegetLocalMaxMemory()
in GemFire 5.1 and later releasesThis method returns local properties. There are currently no local properties defined that are not also deprecated.- Returns:
- local properties
-
getGlobalProperties
@Deprecated java.util.Properties getGlobalProperties()
Deprecated.usegetTotalMaxMemory()
andgetTotalNumBuckets()
in GemFire 5.1 and later releasesThis method returns global properties. There are currently no global properties defined that are not also deprecated.- Returns:
- global properties
-
getPartitionResolver
PartitionResolver<K,V> getPartitionResolver()
Returns the PartitionResolver set for custom partitioning- Returns:
PartitionResolver
for the PartitionedRegion- Since:
- GemFire 6.0
-
getRecoveryDelay
long getRecoveryDelay()
Returns the delay in milliseconds that existing members will wait before satisfying redundancy after another member crashes. Default value of recoveryDelay is -1 which indicates that redundancy won't be recovered if a member crashes.- Returns:
- the delay in milliseconds that existing members will wait before satisfying redundancy after another member crashes
- Since:
- GemFire 6.0
-
getStartupRecoveryDelay
long getStartupRecoveryDelay()
Returns the delay in milliseconds that a new member will wait before trying to satisfy redundancy of data hosted on other members. Default value is 0 which is to recover redundancy immediately when a new member is added.- Returns:
- the delay in milliseconds that a new member will wait before trying to satisfy redundancy of data hosted on other members
- Since:
- GemFire 6.0
-
getPartitionListeners
PartitionListener[] getPartitionListeners()
Returns array of PartitionListener{s} configured on this partitioned region- Returns:
- PartitionListener configured on this partitioned region
- Since:
- GemFire 6.5
- See Also:
PartitionListener
-
getFixedPartitionAttributes
java.util.List<FixedPartitionAttributes> getFixedPartitionAttributes()
ReturnsFixedPartitionAttributes
's list of local partitions defined on this Partitioned Region- Returns:
FixedPartitionAttributes
's list of local partitions defined on this Partitioned Region- Since:
- GemFire 6.6
-
convertToConfigPartitionAttributes
default RegionAttributesType.PartitionAttributes convertToConfigPartitionAttributes()
-
-