Class Cursor

All Implemented Interfaces:
UnsafeSerializable, Serializable, Cloneable

@Entity public class Cursor extends UpdateAutoTimestampEntity
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:
  • Field Details

    • GLOBAL

      public static final String GLOBAL
      The scope of a global cursor. A global cursor is a cursor that is not specific to one tld.
      See Also:
  • Constructor Details

    • Cursor

      public Cursor()
  • Method Details

    • createVKey

      public VKey<Cursor> createVKey()
      createVKey in class ImmutableObject
    • createGlobalVKey

      public static VKey<Cursor> createGlobalVKey(Cursor.CursorType type)
    • createScopedVKey

      public static VKey<Cursor> createScopedVKey(Cursor.CursorType type, Tld tld)
    • getLastUpdateTime

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

      public String getScope()
    • getType

      public Cursor.CursorType getType()
    • 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, Tld scope)
      Creates a new cursor instance with a given Tld scope.
    • getCursorTimeOrStartOfTime

      public static org.joda.time.DateTime getCursorTimeOrStartOfTime(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()