|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy org.eclipse.persistence.descriptors.partitioning.FieldPartitioningPolicy org.eclipse.persistence.descriptors.partitioning.ValuePartitioningPolicy
public class ValuePartitioningPolicy
PUBLIC: ValuePartitioningPolicy partitions access to a database cluster by a field value from the object, such as the object's location, or tenant. Each value is assigned a specific server. 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.
Field Summary | |
---|---|
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 indx. |
protected java.util.Map<java.lang.Object,java.lang.String> |
partitions
Store the value partitions. |
Fields inherited from class org.eclipse.persistence.descriptors.partitioning.FieldPartitioningPolicy |
---|
partitionField, unionUnpartitionableQueries |
Fields inherited from class org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy |
---|
name |
Constructor Summary | |
---|---|
ValuePartitioningPolicy()
|
|
ValuePartitioningPolicy(java.lang.String partitionField)
|
|
ValuePartitioningPolicy(java.lang.String partitionField,
boolean unionUnpartitionableQueries)
|
Method Summary | |
---|---|
void |
addPartition(java.lang.Object value,
java.lang.String connectionPool)
PUBLIC: Add the value partition. |
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. |
Methods inherited from class org.eclipse.persistence.descriptors.partitioning.FieldPartitioningPolicy |
---|
extractPartitionValueForPersist, getPartitionField, getPartitionFieldName, getUnionUnpartitionableQueries, setPartitionField, setPartitionField, setUnionUnpartitionableQueries |
Methods inherited from class org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy |
---|
acquireAccessor, convertClassNamesToClasses, getAccessor, getName, initialize, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.Object,java.lang.String> partitions
protected java.util.List<java.lang.String> orderedPartitions
protected java.lang.String defaultConnectionPool
Constructor Detail |
---|
public ValuePartitioningPolicy()
public ValuePartitioningPolicy(java.lang.String partitionField)
public ValuePartitioningPolicy(java.lang.String partitionField, boolean unionUnpartitionableQueries)
Method Detail |
---|
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 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
|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |