Class StreamingTrait

  • All Implemented Interfaces:
    FromSourceLocation, ToNode, ToShapeId, Trait

    public final class StreamingTrait
    extends AnnotationTrait
    Indicates that the data stored in the shape is very large and should not be stored in memory, or that the size of the data stored in the shape is unknown at the start of a request.
    • Field Detail

      • ID

        public static final ShapeId ID
    • Constructor Detail

      • StreamingTrait

        public StreamingTrait​(ObjectNode node)
      • StreamingTrait

        public StreamingTrait()
    • Method Detail

      • isEventStream

        public static boolean isEventStream​(Shape shape)
        Determines whether a given shape is an event stream.
        Parameters:
        shape - The shape to check.
        Returns:
        True if the shape is a union and has the streaming trait.
      • isEventStream

        public static boolean isEventStream​(Model model,
                                            MemberShape member)
        Determines whether a given member targets an event stream.
        Parameters:
        model - The model containing the member and its target.
        member - The member whose target should be checked.
        Returns:
        True if the member targets a union with the streaming trait.