EclipseLink 2.3.2, build 'v20111125-r10461' API Reference

org.eclipse.persistence.descriptors.partitioning
Class UnionPartitioningPolicy

java.lang.Object
  extended by org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
      extended by org.eclipse.persistence.descriptors.partitioning.ReplicationPartitioningPolicy
          extended by org.eclipse.persistence.descriptors.partitioning.UnionPartitioningPolicy
All Implemented Interfaces:
java.io.Serializable

public class UnionPartitioningPolicy
extends ReplicationPartitioningPolicy

PUBLIC: UnionPartitionPolicy sends queries to all connection pools and unions the results. This is for queries or relationships that span partitions when partitioning is used, such as on a ManyToMany cross partition relationship.

See Also:
Serialized Form
Author:
James Sutherland
Since:
EclipseLink 2.2

Field Summary
protected  boolean replicateWrites
           
 
Fields inherited from class org.eclipse.persistence.descriptors.partitioning.ReplicationPartitioningPolicy
connectionPools
 
Fields inherited from class org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
name
 
Constructor Summary
UnionPartitioningPolicy()
           
UnionPartitioningPolicy(boolean replicateWrites)
           
UnionPartitioningPolicy(java.util.List<java.lang.String> pools)
           
UnionPartitioningPolicy(java.lang.String... pools)
           
 
Method Summary
 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.
 boolean getReplicateWrites()
          PUBLIC: Return if write queries should be replicated.
 void setReplicateWrites(boolean replicateWrites)
          PUBLIC: Set if write queries should be replicated.
 
Methods inherited from class org.eclipse.persistence.descriptors.partitioning.ReplicationPartitioningPolicy
addConnectionPool, getConnectionPools, initialize, setConnectionPools
 
Methods inherited from class org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
acquireAccessor, convertClassNamesToClasses, getAccessor, getName, partitionPersist, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

replicateWrites

protected boolean replicateWrites
Constructor Detail

UnionPartitioningPolicy

public UnionPartitioningPolicy()

UnionPartitioningPolicy

public UnionPartitioningPolicy(boolean replicateWrites)

UnionPartitioningPolicy

public UnionPartitioningPolicy(java.lang.String... pools)

UnionPartitioningPolicy

public UnionPartitioningPolicy(java.util.List<java.lang.String> pools)
Method Detail

getReplicateWrites

public boolean getReplicateWrites()
PUBLIC: Return if write queries should be replicated. Writes are normally not replicated when unioning, but can be for ManyToMany relationships, when the join table needs to be replicated.


setReplicateWrites

public void setReplicateWrites(boolean replicateWrites)
PUBLIC: Set if write queries should be replicated. Writes are normally not replicated when unioning, but can be for ManyToMany relationships, when the join table needs to be replicated.


getConnectionsForQuery

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)
INTERNAL: Get a connection from one of the pools in a round robin rotation fashion.

Overrides:
getConnectionsForQuery in class ReplicationPartitioningPolicy

EclipseLink 2.3.2, build 'v20111125-r10461' API Reference