Package org.apache.openjpa.slice
Interface ReplicationPolicy
- 
- All Known Implementing Classes:
 ReplicationPolicy.Default
public interface ReplicationPolicyPolicy 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:
 DistributionPolicy
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classReplicationPolicy.DefaultImplements a default replication policy to replicate the given instance across all available slices. 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String[]replicate(java.lang.Object pc, java.util.List<java.lang.String> slices, java.lang.Object context)Gets the name of the slices where a given instance will be replicated. 
 - 
 
- 
- 
Method Detail
- 
replicate
java.lang.String[] replicate(java.lang.Object pc, java.util.List<java.lang.String> slices, java.lang.Object context)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.Namesproperty or implicit i.e. alphabetic order of available identifiers ifopenjpa.slice.Namesis 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:
 DistributedConfiguration.getActiveSliceNames()
 
 - 
 
 -