Top Description Fields Constructors Methods
org.eclipse.persistence.descriptors.partitioning

public abstract Class PartitioningPolicy

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Known Direct Subclasses
org.eclipse.persistence.descriptors.partitioning.PinnedPartitioningPolicy, org.eclipse.persistence.descriptors.partitioning.ReplicationPartitioningPolicy, org.eclipse.persistence.descriptors.partitioning.CustomPartitioningPolicy, org.eclipse.persistence.descriptors.partitioning.FieldPartitioningPolicy
Imports
java.util.List, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.QueryException, org.eclipse.persistence.internal.databaseaccess.Accessor, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, org.eclipse.persistence.queries.DatabaseQuery, org.eclipse.persistence.sessions.server.ClientSession, .ConnectionPool, .ServerSession

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.

Author
James Sutherland
Since
EclipseLink 2.2

Field Summary

Modifier and TypeField and Description
protected String
name

The persistent unit unique name for the policy.

Constructor Summary

AccessConstructor and Description
protected
PartitioningPolicy()

Default constructor.

Method Summary

Modifier and TypeMethod and Description
public Accessor
acquireAccessor(String poolName, ServerSession session, DatabaseQuery query, boolean returnNullIfDead)

INTERNAL: Return an accessor from the pool.

public void
convertClassNamesToClasses(ClassLoader classLoader)

INTERNAL: Convert all the class-name-based settings to actual class-based settings.

public Accessor
getAccessor(String poolName, AbstractSession session, DatabaseQuery query, boolean returnNullIfDead)

INTERNAL: Return an accessor from the pool for the session.

public abstract List<Accessor>
public String
getName()

PUBLIC: Return the name of the policy.

public void
initialize(AbstractSession session)

INTERNAL: Initialize the policy.

public void
partitionPersist(AbstractSession session, Object object, ClassDescriptor descriptor)

INTERNAL: Allow for the persist call to assign the partition.

public void
setName(String name)

PUBLIC: Set the name of the policy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nameback to summary
protected String name

The persistent unit unique name for the policy.

Constructor Detail

PartitioningPolicyback to summary
protected PartitioningPolicy()

Default constructor.

Method Detail

acquireAccessorback to summary
public Accessor acquireAccessor(String poolName, ServerSession session, DatabaseQuery query, boolean returnNullIfDead)

INTERNAL: Return an accessor from the pool.

convertClassNamesToClassesback to summary
public void convertClassNamesToClasses(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.

getAccessorback to summary
public Accessor getAccessor(String poolName, 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.

getConnectionsForQueryback to summary
public abstract List<Accessor> getConnectionsForQuery(AbstractSession session, DatabaseQuery query, AbstractRecord arguments)
getNameback to summary
public 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.

initializeback to summary
public void initialize(AbstractSession session)

INTERNAL: Initialize the policy.

partitionPersistback to summary
public void partitionPersist(AbstractSession session, Object object, ClassDescriptor descriptor)

INTERNAL: Allow for the persist call to assign the partition.

setNameback to summary
public void setName(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.