Class CollectionType<EntryType,IntermediateType>
- java.lang.Object
-
- org.apache.cassandra.spark.common.schema.CollectionType<EntryType,IntermediateType>
-
- All Implemented Interfaces:
java.io.Serializable,ColumnType<java.util.Collection<EntryType>>
public abstract class CollectionType<EntryType,IntermediateType> extends java.lang.Object implements ColumnType<java.util.Collection<EntryType>>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CollectionType()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.List<EntryType>finaliseCollection(java.util.List<IntermediateType> entryList)abstract IntermediateTypeparseCollectionColumn(java.nio.ByteBuffer colNameSuffix, java.nio.ByteBuffer colValue)java.util.Collection<EntryType>parseColumn(java.nio.ByteBuffer buffer, int length)Parses a value of this type from buffer.java.nio.ByteBufferserialize(java.util.Collection<EntryType> value)Serialize into ByteBuffer and keeps the position at beginning of ByteBuffer
-
-
-
Method Detail
-
parseColumn
public java.util.Collection<EntryType> parseColumn(java.nio.ByteBuffer buffer, int length)
Description copied from interface:ColumnTypeParses 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:
parseColumnin interfaceColumnType<EntryType>- Parameters:
buffer- Buffer to parse column fromlength- 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:ColumnTypeSerialize into ByteBuffer and keeps the position at beginning of ByteBuffer- Specified by:
serializein interfaceColumnType<EntryType>- Parameters:
value- the value to serialize- Returns:
- A ByteBuffer containing the serialized value
-
-