Class SlicePersistence


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

      Fields 
      Modifier and Type Field Description
      static java.lang.String HINT_TARGET
      The key for setting the Query hints.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getSlice​(java.lang.Object obj)
      Get the slice identifier for the given instance if it is a managed instance and has been assigned to a slice.
      static boolean isReplicated​(java.lang.Object obj)
      Affirms if the given instance is replicated, provided the given instance is managed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • HINT_TARGET

        public static final java.lang.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 java.lang.String getSlice​(java.lang.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​(java.lang.Object obj)
        Affirms if the given instance is replicated, provided the given instance is managed.