Class SlicePersistence


  • public class SlicePersistence
    extends Object
    A helper to determine the slice identifier of an instance.
    Author:
    Pinaki Poddar
    • Field Detail

      • HINT_TARGET

        public static final String HINT_TARGET
        The key for setting the Query hints. The value is comma-separated Slice names. If the hint is specified then the query is executed only on the listed slices.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SlicePersistence

        public SlicePersistence()
    • Method Detail

      • getSlice

        public static String getSlice​(Object obj)
        Get the slice identifier for the given instance if it is a managed instance and has been assigned to a slice. If the given instance is replicated across multiple slices then returns comma-separated list of slice names.
        Returns:
        name of the slice, if any. null otherwise.
      • isReplicated

        public static boolean isReplicated​(Object obj)
        Affirms if the given instance is replicated, provided the given instance is managed.