public class ValuePartitioningPolicy extends FieldPartitioningPolicy
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
defaultConnectionPool
The default connection pool is used for any unmapped values.
|
protected java.util.List<java.lang.String> |
orderedPartitions
Use to track order for compute UCP index.
|
protected java.util.Map<java.lang.String,java.lang.String> |
partitionNames
Store the value partitions by name.
|
protected java.util.Map<java.lang.Object,java.lang.String> |
partitions
Store the value partitions.
|
protected java.lang.Class |
partitionValueType
The type of the partition values.
|
protected java.lang.String |
partitionValueTypeName
The type name of the partition value names.
|
partitionField, unionUnpartitionableQueries
name
Constructor and Description |
---|
ValuePartitioningPolicy() |
ValuePartitioningPolicy(java.lang.String partitionField) |
ValuePartitioningPolicy(java.lang.String partitionField,
boolean unionUnpartitionableQueries) |
Modifier and Type | Method and Description |
---|---|
void |
addPartition(java.lang.Object value,
java.lang.String connectionPool)
PUBLIC:
Add the value partition.
|
void |
addPartitionName(java.lang.String valueName,
java.lang.String connectionPool)
INTERNAL:
Add partition values by name (will be initialized at runtime with the
real class loader).
|
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings to actual class-based settings.
|
java.util.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.
|
java.lang.String |
getDefaultConnectionPool()
PUBLIC:
Return the default connection pool used for any unmapped values.
|
java.util.List<java.lang.String> |
getOrderedPartitions() |
java.util.Map<java.lang.Object,java.lang.String> |
getPartitions()
PUBLIC:
Return the value partitions.
|
void |
partitionPersist(org.eclipse.persistence.internal.sessions.AbstractSession session,
java.lang.Object object,
ClassDescriptor descriptor)
INTERNAL:
Allow for the persist call to assign the partition.
|
void |
setDefaultConnectionPool(java.lang.String defaultConnectionPool)
PUBLIC:
Set the default connection pool used for any unmapped values.
|
void |
setOrderedPartitions(java.util.List<java.lang.String> orderedPartitions) |
void |
setPartitions(java.util.Map<java.lang.Object,java.lang.String> partitions)
PUBLIC:
Set the value partitions.
|
void |
setPartitionValueTypeName(java.lang.String partitionValueTypeName)
INTERNAL:
|
extractPartitionValueForPersist, getPartitionField, getPartitionFieldName, getUnionUnpartitionableQueries, setPartitionField, setPartitionField, setUnionUnpartitionableQueries
acquireAccessor, getAccessor, getName, initialize, setName
protected java.util.Map<java.lang.Object,java.lang.String> partitions
protected java.util.Map<java.lang.String,java.lang.String> partitionNames
protected java.lang.String partitionValueTypeName
protected java.lang.Class partitionValueType
protected java.util.List<java.lang.String> orderedPartitions
protected java.lang.String defaultConnectionPool
public ValuePartitioningPolicy()
public ValuePartitioningPolicy(java.lang.String partitionField)
public ValuePartitioningPolicy(java.lang.String partitionField, boolean unionUnpartitionableQueries)
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
convertClassNamesToClasses
in class PartitioningPolicy
public void setPartitionValueTypeName(java.lang.String partitionValueTypeName)
public java.util.List<java.lang.String> getOrderedPartitions()
public void setOrderedPartitions(java.util.List<java.lang.String> orderedPartitions)
public java.lang.String getDefaultConnectionPool()
public void setDefaultConnectionPool(java.lang.String defaultConnectionPool)
public java.util.Map<java.lang.Object,java.lang.String> getPartitions()
public void setPartitions(java.util.Map<java.lang.Object,java.lang.String> partitions)
public void addPartition(java.lang.Object value, java.lang.String connectionPool)
public void addPartitionName(java.lang.String valueName, java.lang.String connectionPool)
public java.util.List<org.eclipse.persistence.internal.databaseaccess.Accessor> getConnectionsForQuery(org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord arguments)
getConnectionsForQuery
in class PartitioningPolicy
public void partitionPersist(org.eclipse.persistence.internal.sessions.AbstractSession session, java.lang.Object object, ClassDescriptor descriptor)
partitionPersist
in class PartitioningPolicy