Class SetStartpointOptions


  • public final class SetStartpointOptions
    extends java.lang.Object
    Used to identify how to set the starting point for synchronization (beginning of changelog, end of changelog, based on a change sequence number, etc). Different startpoint types require different supporting values; for example if the type is RESUME_AT_CHANGE_NUMBER, the value must be a long that represents a change number to start at. Some of the startpoint types require a server name to be specified as well.

    These objects will be constructed by the realtime-sync CLI and passed down into the SetStartpointTask, which will then delegate to the specific Sync Pipe and finally the Sync Source implementation for that pipe. Not all Sync Source implementations will support all the startpoint types. If an unsupported type is specified, the underlying implementation is free to throw a RuntimeException stating that the startpoint type is unsupported.

    • Method Detail

      • createBeginningOfChangelogOptions

        public static SetStartpointOptions createBeginningOfChangelogOptions()
        Creates a SetStartpointOptions instance with the BEGINNING_OF_CHANGELOG startpoint type.
        Returns:
        a immutable instance of this class with only the startpoint type populated
      • createEndOfChangelogOptions

        public static SetStartpointOptions createEndOfChangelogOptions()
        Creates a SetStartpointOptions instance with the END_OF_CHANGELOG startpoint type.
        Returns:
        a immutable instance of this class with only the startpoint type populated
      • createResumeAtCSNOptions

        public static SetStartpointOptions createResumeAtCSNOptions​(java.lang.String csn)
        Creates a SetStartpointOptions instance with the RESUME_AT_CSN startpoint type.
        Parameters:
        csn - the change sequence number of the first change to synchronize
        Returns:
        a immutable instance of this class with the CSN value populated
      • createResumeAtChangeNumberOptions

        public static SetStartpointOptions createResumeAtChangeNumberOptions​(long changeNumber,
                                                                             java.lang.String serverName)
        Creates a SetStartpointOptions instance with the RESUME_AT_CHANGE_NUMBER startpoint type.
        Parameters:
        changeNumber - the change number of the first change to synchronize
        serverName - the name of the External Server to which the change number applies. The CLI requires this parameter to be non-null, because a given change number may correspond to different changes on different replicas.
        Returns:
        a immutable instance of this class with the change number and server name populated
      • createResumeAtChangeTimeOptions

        public static SetStartpointOptions createResumeAtChangeTimeOptions​(java.util.Date changeTime,
                                                                           java.lang.String serverName)
        Creates a SetStartpointOptions instance with the RESUME_AT_CHANGE_TIME startpoint type. Changes made prior to the specified change time will be ignored.
        Parameters:
        changeTime - the cut-off time at which synchronization will resume
        serverName - the name of the External Server to which the change time applies. The CLI allows this parameter to be null, but some underlying sync source implementations may require it (such as DSEESyncSource).
        Returns:
        a immutable instance of this class with the change time and server name populated
      • createResumeAtSerializableOptions

        public static SetStartpointOptions createResumeAtSerializableOptions​(java.io.Serializable startpointValue)
        Creates a SetStartpointOptions instance with the RESUME_AT_SERIALIZABLE startpoint type. Changes made prior to the specified state will be ignored.
        Parameters:
        startpointValue - a Serializable object which can be passed to the sync source as a valid indicator of where to start synchronization
        Returns:
        a immutable instance of this class with the generic startpoint value populated
      • getCSN

        public java.lang.String getCSN()
        Gets the CSN value if one was specified.
        Returns:
        a change sequence number, or null if the startpoint type is not RESUME_AT_CSN
      • getChangeNumber

        public long getChangeNumber()
        Gets the change number value if one was specified.
        Returns:
        a change number, or null if the startpoint type is not RESUME_AT_CHANGE_NUMBER
      • getChangeTime

        public java.util.Date getChangeTime()
        Gets the change time value if one was specified.
        Returns:
        a Date, or null if the startpoint type is not RESUME_AT_CHANGE_TIME
      • getSerializableValue

        public java.io.Serializable getSerializableValue()
        Gets the generic (serializable) startpoint value if one was specified.
        Returns:
        a Serializable instance, or null if the startpoint type is not RESUME_AT_SERIALIZABLE
      • getServerName

        public java.lang.String getServerName()
        Gets the server name if one was specified, representing the External Server at which to set the start point.
        Returns:
        an External Server name, or null if one was not specified