Package org.apache.openjpa.slice
Class ReplicationPolicy.Default
- java.lang.Object
-
- org.apache.openjpa.slice.ReplicationPolicy.Default
-
- All Implemented Interfaces:
ReplicationPolicy
- Enclosing interface:
- ReplicationPolicy
public static class ReplicationPolicy.Default extends java.lang.Object implements ReplicationPolicy
Implements a default replication policy to replicate the given instance across all available slices.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.openjpa.slice.ReplicationPolicy
ReplicationPolicy.Default
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Concrete 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
public java.lang.String[] replicate(java.lang.Object pc, java.util.List<java.lang.String> slices, java.lang.Object context)
Description copied from interface:ReplicationPolicy
Gets the name of the slices where a given instance will be replicated.- Specified by:
replicate
in interfaceReplicationPolicy
- 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:
DistributedConfiguration.getActiveSliceNames()
-
-