EclipseLink 2.3.2, build 'v20111125-r10461' API Reference

org.eclipse.persistence.descriptors.partitioning
Class PartitioningPolicy

java.lang.Object
  extended by org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CustomPartitioningPolicy, FieldPartitioningPolicy, PinnedPartitioningPolicy, ReplicationPartitioningPolicy

public abstract class PartitioningPolicy
extends java.lang.Object
implements java.io.Serializable

PUBLIC: A PartitioningPolicy is used to partition the data for a class across multiple difference databases or across a database cluster such as Oracle RAC. Partitioning can provide improved scalability by allowing multiple database machines to service requests.

If multiple partitions are used to process a single transaction, JTA should be used for proper XA transaction support.

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

Field Summary
protected  java.lang.String name
          The persistent unit unique name for the policy.
 
Constructor Summary
PartitioningPolicy()
           
 
Method Summary
 org.eclipse.persistence.internal.databaseaccess.Accessor acquireAccessor(java.lang.String poolName, ServerSession session, DatabaseQuery query, boolean returnNullIfDead)
          INTERNAL: Return an accessor from the pool.
 void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
          INTERNAL: Convert all the class-name-based settings to actual class-based settings.
 org.eclipse.persistence.internal.databaseaccess.Accessor getAccessor(java.lang.String poolName, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseQuery query, boolean returnNullIfDead)
          INTERNAL: Return an accessor from the pool for the session.
abstract  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)
           
 java.lang.String getName()
          PUBLIC: Return the name of the policy.
 void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
          INTERNAL: Initialize the policy.
 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 setName(java.lang.String name)
          PUBLIC: Set the name of the policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The persistent unit unique name for the policy.

Constructor Detail

PartitioningPolicy

public PartitioningPolicy()
Method Detail

getConnectionsForQuery

public abstract 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)

partitionPersist

public 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.


initialize

public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the policy.


convertClassNamesToClasses

public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: 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.


acquireAccessor

public org.eclipse.persistence.internal.databaseaccess.Accessor acquireAccessor(java.lang.String poolName,
                                                                                ServerSession session,
                                                                                DatabaseQuery query,
                                                                                boolean returnNullIfDead)
INTERNAL: Return an accessor from the pool.


getAccessor

public org.eclipse.persistence.internal.databaseaccess.Accessor getAccessor(java.lang.String poolName,
                                                                            org.eclipse.persistence.internal.sessions.AbstractSession session,
                                                                            DatabaseQuery query,
                                                                            boolean returnNullIfDead)
INTERNAL: Return an accessor from the pool for the session. For a client session the accessor is stored for the duration of the transaction.


getName

public java.lang.String getName()
PUBLIC: Return the name of the policy. The name must be unique for the persistence unit. The name allows the policy to be shared among multiple descriptors, queries.


setName

public void setName(java.lang.String name)
PUBLIC: Set the name of the policy. The name must be unique for the persistence unit. The name allows the policy to be shared among multiple descriptors, queries.


EclipseLink 2.3.2, build 'v20111125-r10461' API Reference