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

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Implements a default replication policy to replicate the given instance across all available slices.
  • Method Summary

    Modifier and Type
    Method
    Description
    replicate(Object pc, List<String> slices, Object context)
    Gets the name of the slices where a given instance will be replicated.
  • Method Details

    • replicate

      String[] replicate(Object pc, List<String> slices, 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 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: