Interface ReplicationPolicy

All Known Implementing Classes:

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.

Pinaki Poddar
See Also:

Nested Class Summary
static class ReplicationPolicy.Default
          Implements a default replication policy to replicate the given instance across all available slices.
Method Summary
 String[] replicate(Object pc, List<String> slices, Object context)
          Gets the name of the slices where a given instance will be replicated.

Method Detail


String[] replicate(Object pc,
                   List<String> slices,
                   Object context)
Gets the name of the slices where a given instance will be replicated.

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.
identifier of the slices. This names must match one of the given slice names.
See Also:

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