Class NamespaceIdDto

  • All Implemented Interfaces:
    Serializer

    public final class NamespaceIdDto
    extends java.lang.Object
    implements Serializer
    Namespace id.
    • Constructor Summary

      Constructors 
      Constructor Description
      NamespaceIdDto​(long namespaceId)
      Constructor.
      NamespaceIdDto​(java.io.DataInputStream stream)
      Constructor - Creates an object from stream.
    • Constructor Detail

      • NamespaceIdDto

        public NamespaceIdDto​(long namespaceId)
        Constructor.
        Parameters:
        namespaceId - Namespace id.
      • NamespaceIdDto

        public NamespaceIdDto​(java.io.DataInputStream stream)
        Constructor - Creates an object from stream.
        Parameters:
        stream - Byte stream to use to serialize.
    • Method Detail

      • getNamespaceId

        public long getNamespaceId()
        Gets Namespace id.
        Returns:
        Namespace id.
      • getSize

        public int getSize()
        Gets the size of the object.
        Specified by:
        getSize in interface Serializer
        Returns:
        Size in bytes.
      • loadFromBinary

        public static NamespaceIdDto loadFromBinary​(java.io.DataInputStream stream)
        Creates an instance of NamespaceIdDto from a stream.
        Parameters:
        stream - Byte stream to use to serialize the object.
        Returns:
        Instance of NamespaceIdDto.
      • serialize

        public byte[] serialize()
        Serializes an object to bytes.
        Specified by:
        serialize in interface Serializer
        Returns:
        Serialized bytes.