Class RangePartitioningPolicy
java.lang.Object
org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
org.eclipse.persistence.descriptors.partitioning.FieldPartitioningPolicy
org.eclipse.persistence.descriptors.partitioning.RangePartitioningPolicy
- All Implemented Interfaces:
- Serializable
PUBLIC:
 RangePartitioningPolicy partitions access to a database cluster by a field value from the object,
 such as the object's id, location, or tenant.
 Each server is assigned a range of values.
 All write or read request for object's with that value are sent to the server.
 If a query does not include the field as a parameter, then it can either be sent
 to all server's and unioned, or left to the sesion's default behavior.
- See Also:
- Author:
- James Sutherland
- 
Field SummaryFieldsFields inherited from class org.eclipse.persistence.descriptors.partitioning.FieldPartitioningPolicypartitionField, unionUnpartitionableQueriesFields inherited from class org.eclipse.persistence.descriptors.partitioning.PartitioningPolicyname
- 
Constructor SummaryConstructorsConstructorDescriptionRangePartitioningPolicy(String partitionField) RangePartitioningPolicy(String partitionField, boolean unionUnpartitionableQueries) RangePartitioningPolicy(String partitionField, RangePartition... partitions) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPartition(String connectionPool, Comparable startValue, Comparable endValue) PUBLIC: Add the range partition.voidaddPartition(RangePartition partition) PUBLIC: Add the range partition.voidconvertClassNamesToClasses(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings to actual class-based settings.List<org.eclipse.persistence.internal.databaseaccess.Accessor>getConnectionsForQuery(org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord arguments) INTERNAL: Get a connection from one of the pools in a round robin rotation fashion.PUBLIC: Return the range partitions.voidpartitionPersist(org.eclipse.persistence.internal.sessions.AbstractSession session, Object object, ClassDescriptor descriptor) INTERNAL: Allow for the persist call to assign the partition.voidsetPartitions(List<RangePartition> partitions) PUBLIC: Set the range partitions.Methods inherited from class org.eclipse.persistence.descriptors.partitioning.FieldPartitioningPolicyextractPartitionValueForPersist, getPartitionField, getPartitionFieldName, getUnionUnpartitionableQueries, setPartitionField, setPartitionField, setUnionUnpartitionableQueriesMethods inherited from class org.eclipse.persistence.descriptors.partitioning.PartitioningPolicyacquireAccessor, getAccessor, getName, initialize, setName
- 
Field Details- 
partitions
 
- 
- 
Constructor Details- 
RangePartitioningPolicypublic RangePartitioningPolicy()
- 
RangePartitioningPolicy
- 
RangePartitioningPolicy
- 
RangePartitioningPolicy
 
- 
- 
Method Details- 
convertClassNamesToClassesINTERNAL: Convert all the class-name-based settings to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.- Overrides:
- convertClassNamesToClassesin class- PartitioningPolicy
 
- 
getPartitionsPUBLIC: Return the range partitions. Each partition represents a range of value to route to a connection pool. Range values should not overlap.
- 
setPartitionsPUBLIC: Set the range partitions. Each partition represents a range of value to route to a connection pool. Range values should not overlap.
- 
addPartitionPUBLIC: Add the range partition.
- 
addPartitionPUBLIC: Add the range partition.
- 
getConnectionsForQuerypublic List<org.eclipse.persistence.internal.databaseaccess.Accessor> getConnectionsForQuery(org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord arguments) INTERNAL: Get a connection from one of the pools in a round robin rotation fashion.- Specified by:
- getConnectionsForQueryin class- PartitioningPolicy
 
- 
partitionPersistpublic void partitionPersist(org.eclipse.persistence.internal.sessions.AbstractSession session, Object object, ClassDescriptor descriptor) INTERNAL: Allow for the persist call to assign the partition.- Overrides:
- partitionPersistin class- PartitioningPolicy
 
 
-