Interface Detachable
-
- All Known Subinterfaces:
ColumnDefinition,ColumnDefinitions,CustomType,DataType,ListType,MapType,ReactiveRow,Row,SetType,TupleType,UserDefinedType,VectorType
public interface DetachableDefines the contract of an object that can be detached and reattached to a driver instance.The driver's
data structuretypes (such as rows, tuples and UDT values) store their data as byte buffers, and only decode it on demand, when the end user accesses a particular column or field.Decoding requires a
ProtocolVersion(because the encoded format might change across versions), and aCodecRegistry(because the user might ask us to decode to a custom type).- When a data container was obtained from a driver instance (for example, reading a row from a result set, or reading a value from a UDT column), it is attached: its protocol version and registry are those of the driver.
- When it is created manually by the user (for example, creating an instance from a manually
created
TupleType), it is detached: it usesProtocolVersion.DEFAULTandCodecRegistry.DEFAULT.
A detached object can be reattached to a driver instance. This is done automatically if you pass the object to one of the driver methods, for example if you use a manually created tuple as a query parameter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidattach(AttachmentPoint attachmentPoint)booleanisDetached()
-
-
-
Method Detail
-
isDetached
boolean isDetached()
-
attach
void attach(@NonNull AttachmentPoint attachmentPoint)
-
-