org.apache.openjpa.slice
Class ReplicationPolicy.Default

java.lang.Object
  extended by org.apache.openjpa.slice.ReplicationPolicy.Default
All Implemented Interfaces:
ReplicationPolicy
Enclosing interface:
ReplicationPolicy

public static class ReplicationPolicy.Default
extends 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
ReplicationPolicy.Default()
           
 
Method Summary
 String[] replicate(Object pc, List<String> slices, Object context)
          Gets the name of the slices where a given instance will be replicated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationPolicy.Default

public ReplicationPolicy.Default()
Method Detail

replicate

public String[] replicate(Object pc,
                          List<String> slices,
                          Object context)
Description copied from interface: ReplicationPolicy
Gets the name of the slices where a given instance will be replicated.

Specified by:
replicate in interface ReplicationPolicy
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 explicit openjpa.slice.Names property or implicit i.e. alphabetic order of available identifiers if openjpa.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()


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.