Package google.registry.model.common
Class Cursor
java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.UpdateAutoTimestampEntity
google.registry.model.common.Cursor
- All Implemented Interfaces:
UnsafeSerializable
,Serializable
,Cloneable
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static enum
The types of cursors, used as the string id field for each cursor in the database.Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Field Summary
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Cursor
createGlobal
(Cursor.CursorType cursorType, org.joda.time.DateTime cursorTime) Creates a new global cursor instance.static Cursor
createScoped
(Cursor.CursorType cursorType, org.joda.time.DateTime cursorTime, Tld scope) Creates a new cursor instance with a givenTld
scope.createScopedVKey
(Cursor.CursorType type, Tld tld) org.joda.time.DateTime
static org.joda.time.DateTime
getCursorTimeOrStartOfTime
(Optional<Cursor> cursor) Returns the current time for a given cursor, orSTART_OF_TIME
if the cursor is null.org.joda.time.DateTime
getScope()
getType()
Methods inherited from class google.registry.model.UpdateAutoTimestampEntity
copyUpdateTimestamp, getUpdateTimestamp, resetUpdateTimestamp, setUpdateTimestamp
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
Field Details
-
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
- Overrides:
createVKey
in classImmutableObject
-
createGlobalVKey
-
createScopedVKey
-
getLastUpdateTime
public org.joda.time.DateTime getLastUpdateTime() -
getScope
-
getType
-
createGlobal
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 givenTld
scope. -
getCursorTimeOrStartOfTime
Returns the current time for a given cursor, orSTART_OF_TIME
if the cursor is null. -
getCursorTime
public org.joda.time.DateTime getCursorTime()
-