Class CollectionType<EntryType,​IntermediateType>

  • All Implemented Interfaces:
    java.io.Serializable, ColumnType<java.util.Collection<EntryType>>
    Direct Known Subclasses:
    ListType, MapType, SetType

    public abstract class CollectionType<EntryType,​IntermediateType>
    extends java.lang.Object
    implements ColumnType<java.util.Collection<EntryType>>, java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Detail

      • CollectionType

        public CollectionType()
    • Method Detail

      • parseColumn

        public java.util.Collection<EntryType> parseColumn​(java.nio.ByteBuffer buffer,
                                                           int length)
        Description copied from interface: ColumnType
        Parses a value of this type from buffer. Value will be parsed from current position of the buffer. After completion of the function, position will be moved by "length" bytes.
        Specified by:
        parseColumn in interface ColumnType<EntryType>
        Parameters:
        buffer - Buffer to parse column from
        length - Serialized value size in buffer is as big as length
        Returns:
        value as Java type
      • parseCollectionColumn

        public abstract IntermediateType parseCollectionColumn​(java.nio.ByteBuffer colNameSuffix,
                                                               java.nio.ByteBuffer colValue)
      • finaliseCollection

        public abstract java.util.List<EntryType> finaliseCollection​(java.util.List<IntermediateType> entryList)
      • serialize

        public java.nio.ByteBuffer serialize​(java.util.Collection<EntryType> value)
        Description copied from interface: ColumnType
        Serialize into ByteBuffer and keeps the position at beginning of ByteBuffer
        Specified by:
        serialize in interface ColumnType<EntryType>
        Parameters:
        value - the value to serialize
        Returns:
        A ByteBuffer containing the serialized value