Class Cursor

  • All Implemented Interfaces:
    UnsafeSerializable,, java.lang.Cloneable

    public class Cursor
    extends ImmutableObject
    implements UnsafeSerializable
    Shared entity for date cursors.

    This type supports both "scoped" cursors (i.e. one per TLD) and global (i.e. one per environment) cursors.

    See Also:
    Serialized Form
    • Field Detail

      • GLOBAL

        public static final java.lang.String GLOBAL
        The scope of a global cursor. A global cursor is a cursor that is not specific to one tld.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Cursor

        public Cursor()
    • Method Detail

      • getLastUpdateTime

        public org.joda.time.DateTime getLastUpdateTime()
      • getScope

        public java.lang.String getScope()
      • createGlobal

        public static Cursor createGlobal​(Cursor.CursorType cursorType,
                                          org.joda.time.DateTime cursorTime)
        Creates a new global cursor instance.
      • createScoped

        public static Cursor createScoped​(Cursor.CursorType cursorType,
                                          org.joda.time.DateTime cursorTime,
                                          Registry scope)
        Creates a new cursor instance with a given Registry scope.
      • getCursorTimeOrStartOfTime

        public static org.joda.time.DateTime getCursorTimeOrStartOfTime​(java.util.Optional<Cursor> cursor)
        Returns the current time for a given cursor, or START_OF_TIME if the cursor is null.
      • getCursorTime

        public org.joda.time.DateTime getCursorTime()