Package org.apache.openjpa.slice
Interface ReplicationPolicy
- All Known Implementing Classes:
ReplicationPolicy.Default
public interface ReplicationPolicy
Policy to select one or more of the physical databases referred as
slice in which a given persistent instance will be persisted.
This interface is invoked for entity types that are specified as ReplicatedTypes in the configuration.
- Author:
- Pinaki Poddar
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Implements a default replication policy to replicate the given instance across all available slices. -
Method Summary
-
Method Details
-
replicate
Gets the name of the slices where a given instance will be replicated.- Parameters:
pc
- The newly persistent or to-be-merged object.slices
- list of names of the active slices. The ordering of the list is either explicitopenjpa.slice.Names
property or implicit i.e. alphabetic order of available identifiers ifopenjpa.slice.Names
is unspecified.context
- generic persistence context managing the given instance.- Returns:
- identifier of the slices. This names must match one of the given slice names.
- See Also:
-