Class SudoStreamPids

  • All Implemented Interfaces:
    org.eclipse.ditto.base.model.headers.DittoHeadersSettable<SudoStreamPids>, org.eclipse.ditto.base.model.headers.WithDittoHeaders, org.eclipse.ditto.base.model.headers.WithManifest, org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,​org.eclipse.ditto.json.JsonField>, org.eclipse.ditto.base.model.signals.commands.Command<SudoStreamPids>, org.eclipse.ditto.base.model.signals.Signal<SudoStreamPids>, org.eclipse.ditto.base.model.signals.WithName, org.eclipse.ditto.base.model.signals.WithResource, org.eclipse.ditto.base.model.signals.WithType, StartStreamRequest, StreamingMessage

    @Immutable
    @AllValuesAreNonnullByDefault
    public final class SudoStreamPids
    extends org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoStreamPids>
    implements StartStreamRequest
    Command which starts a stream of persistence IDs with their latest snapshot revisions.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.eclipse.ditto.base.model.signals.commands.Command

        org.eclipse.ditto.base.model.signals.commands.Command.Category, org.eclipse.ditto.base.model.signals.commands.Command.JsonFields
      • Nested classes/interfaces inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable

        org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends java.lang.Object>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,​T extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String TYPE
      Type of this command.
      • Fields inherited from interface org.eclipse.ditto.base.model.signals.commands.Command

        TYPE_QUALIFIER
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void appendPayload​(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder, org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion, java.util.function.Predicate<org.eclipse.ditto.json.JsonField> thePredicate)  
      protected boolean canEqual​(java.lang.Object other)  
      boolean equals​(java.lang.Object obj)  
      static SudoStreamPids fromJson​(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new SudoStreamSnapshotRevisions from a JSON object.
      int getBurst()
      Returns the streaming burst.
      org.eclipse.ditto.base.model.signals.commands.Command.Category getCategory()  
      EntityIdWithRevision getLowerBound()
      Return the lower-bound PID to resume a stream.
      org.eclipse.ditto.json.JsonPointer getResourcePath()  
      java.lang.String getResourceType()  
      long getTimeoutMillis()
      Returns the timeout in milliseconds.
      java.lang.String getTypePrefix()  
      int hashCode()  
      boolean hasNonEmptyLowerBound()
      Return whether the command has a non-empty lower bound.
      static SudoStreamPids of​(java.lang.Integer burst, java.lang.Long timeoutMillis, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders, org.eclipse.ditto.base.model.entity.type.EntityType entityType)
      Creates a new SudoStreamPids command.
      SudoStreamPids setDittoHeaders​(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)  
      java.lang.String toString()  
      SudoStreamPids withLowerBound​(EntityIdWithRevision<?> lowerBound)
      Create a copy of this command with a lower-bound set.
      • Methods inherited from class org.eclipse.ditto.base.model.signals.commands.AbstractCommand

        getDittoHeaders, getManifest, getType, toJson
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.eclipse.ditto.base.model.signals.commands.Command

        getImplementedSchemaVersion, toJson
      • Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable

        getLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonString
      • Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate

        toJson, toJsonString, toJsonString
      • Methods inherited from interface org.eclipse.ditto.base.model.signals.Signal

        getName
    • Field Detail

    • Method Detail

      • of

        public static SudoStreamPids of​(java.lang.Integer burst,
                                        java.lang.Long timeoutMillis,
                                        org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders,
                                        org.eclipse.ditto.base.model.entity.type.EntityType entityType)
        Creates a new SudoStreamPids command.
        Parameters:
        burst - the amount of elements to be collected per message
        timeoutMillis - maximum time to wait for acknowledgement of each stream element.
        dittoHeaders - the command headers of the request.
        entityType - the type of the entity which should be streamed
        Returns:
        the command.
        Throws:
        java.lang.NullPointerException - if any argument is null.
      • fromJson

        public static SudoStreamPids fromJson​(org.eclipse.ditto.json.JsonObject jsonObject,
                                              org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
        Creates a new SudoStreamSnapshotRevisions from a JSON object.
        Parameters:
        jsonObject - the JSON representation of the command.
        dittoHeaders - the optional command headers of the request.
        Returns:
        the command.
        Throws:
        java.lang.NullPointerException - if jsonObject is null.
        org.eclipse.ditto.json.JsonMissingFieldException - if the passed in jsonObject was not in the expected format.
      • withLowerBound

        public SudoStreamPids withLowerBound​(EntityIdWithRevision<?> lowerBound)
        Create a copy of this command with a lower-bound set. The lower bound must be a full PID consisting of a prefix and an entity ID.
        Parameters:
        lowerBound - the lower bound.
        Returns:
        a copy of this command with lower-bound set.
      • getLowerBound

        public EntityIdWithRevision getLowerBound()
        Return the lower-bound PID to resume a stream.
        Returns:
        the lower-bound PID.
      • hasNonEmptyLowerBound

        public boolean hasNonEmptyLowerBound()
        Return whether the command has a non-empty lower bound.
        Returns:
        whether the command has a non-empty lower bound.
      • getBurst

        public int getBurst()
        Description copied from interface: StartStreamRequest
        Returns the streaming burst.
        Specified by:
        getBurst in interface StartStreamRequest
        Returns:
        number of elements to send per message.
      • appendPayload

        protected void appendPayload​(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder,
                                     org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion,
                                     java.util.function.Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
        Specified by:
        appendPayload in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoStreamPids>
      • getTypePrefix

        public java.lang.String getTypePrefix()
        Specified by:
        getTypePrefix in interface org.eclipse.ditto.base.model.signals.commands.Command<SudoStreamPids>
      • getCategory

        public org.eclipse.ditto.base.model.signals.commands.Command.Category getCategory()
        Specified by:
        getCategory in interface org.eclipse.ditto.base.model.signals.commands.Command<SudoStreamPids>
      • setDittoHeaders

        public SudoStreamPids setDittoHeaders​(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
        Specified by:
        setDittoHeaders in interface org.eclipse.ditto.base.model.signals.commands.Command<SudoStreamPids>
        Specified by:
        setDittoHeaders in interface org.eclipse.ditto.base.model.headers.DittoHeadersSettable<SudoStreamPids>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoStreamPids>
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object obj)
        Overrides:
        equals in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoStreamPids>
      • canEqual

        protected boolean canEqual​(@Nullable
                                   java.lang.Object other)
        Overrides:
        canEqual in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoStreamPids>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoStreamPids>
      • getResourcePath

        public org.eclipse.ditto.json.JsonPointer getResourcePath()
        Specified by:
        getResourcePath in interface org.eclipse.ditto.base.model.signals.WithResource
      • getResourceType

        public java.lang.String getResourceType()
        Specified by:
        getResourceType in interface org.eclipse.ditto.base.model.signals.WithResource