public class HashPartitioningPolicy extends FieldPartitioningPolicy
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.String> |
connectionPools |
partitionField, unionUnpartitionableQueries
name
Constructor and Description |
---|
HashPartitioningPolicy() |
HashPartitioningPolicy(java.lang.String partitionField) |
HashPartitioningPolicy(java.lang.String partitionField,
boolean unionUnpartitionableQueries) |
Modifier and Type | Method and Description |
---|---|
void |
addConnectionPool(java.lang.String connectionPool)
PUBLIC:
Add the connection pool name to the list of pools to rotate queries through.
|
java.util.List<java.lang.String> |
getConnectionPools()
PUBLIC:
Return the list of connection pool names to replicate queries to.
|
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.
|
void |
initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Default the connection pools to all pools if unset.
|
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 |
setConnectionPools(java.util.List<java.lang.String> connectionPools)
PUBLIC:
Set the list of connection pool names to replicate queries to.
|
extractPartitionValueForPersist, getPartitionField, getPartitionFieldName, getUnionUnpartitionableQueries, setPartitionField, setPartitionField, setUnionUnpartitionableQueries
acquireAccessor, convertClassNamesToClasses, getAccessor, getName, setName
public HashPartitioningPolicy()
public HashPartitioningPolicy(java.lang.String partitionField)
public HashPartitioningPolicy(java.lang.String partitionField, boolean unionUnpartitionableQueries)
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
initialize
in class PartitioningPolicy
public java.util.List<java.lang.String> getConnectionPools()
public void setConnectionPools(java.util.List<java.lang.String> connectionPools)
public void addConnectionPool(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