Class PartitioningPolicy
java.lang.Object
org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CustomPartitioningPolicy
,FieldPartitioningPolicy
,PinnedPartitioningPolicy
,ReplicationPartitioningPolicy
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:
- Author:
- James Sutherland
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.persistence.internal.databaseaccess.Accessor
acquireAccessor
(String poolName, ServerSession session, DatabaseQuery query, boolean returnNullIfDead) INTERNAL: Return an accessor from the pool.void
convertClassNamesToClasses
(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings to actual class-based settings.org.eclipse.persistence.internal.databaseaccess.Accessor
getAccessor
(String poolName, org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseQuery query, boolean returnNullIfDead) INTERNAL: Return an accessor from the pool for the session.abstract List<org.eclipse.persistence.internal.databaseaccess.Accessor>
getConnectionsForQuery
(org.eclipse.persistence.internal.sessions.AbstractSession session, DatabaseQuery query, org.eclipse.persistence.internal.sessions.AbstractRecord arguments) 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, Object object, ClassDescriptor descriptor) INTERNAL: Allow for the persist call to assign the partition.void
PUBLIC: Set the name of the policy.
-
Field Details
-
name
The persistent unit unique name for the policy.
-
-
Constructor Details
-
PartitioningPolicy
public PartitioningPolicy()
-
-
Method Details
-
getConnectionsForQuery
public abstract 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, 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
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(String poolName, ServerSession session, DatabaseQuery query, boolean returnNullIfDead) INTERNAL: Return an accessor from the pool. -
getAccessor
public org.eclipse.persistence.internal.databaseaccess.Accessor getAccessor(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: 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: 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.
-