Java SDK Documentation
23.4.0
|
Classes | |
class | MatchingKeySelector |
Public Member Functions | |
Encoder (TypeCoercion coercion) | |
int | byteSize () |
void | consume (Map< String,?> data) |
void | consume (Iterator< Map.Entry< String, Object >> data) |
void | consume (Iterator< Map.Entry< String, Object >> data, int sizeEstimate) |
ByteBuffer | encode () |
void | encode (ByteBuffer buffer) |
String | keyForIdent (String ident) |
An encoder able to generate a VMap, Vertica's aggregate data type.
com.vertica.sdk.vmap.v1.Encoder.Encoder | ( | TypeCoercion | coercion | ) |
Create an Encoder instance.
coercion | A TypeCoercion instance used to provide guidance on serializing input data before encoding it into a VMap. |
int com.vertica.sdk.vmap.v1.Encoder.byteSize | ( | ) |
Returns the output length of the encoded VMap. Available only after consume.
Referenced by com.vertica.sdk.vmap.v1.Encoder.encode().
void com.vertica.sdk.vmap.v1.Encoder.consume | ( | Map< String,?> | data | ) |
Execute the consume phase of encoding.
data | A map of data specified with String keys. |
Referenced by com.vertica.sdk.vmap.v1.Encoder.consume().
void com.vertica.sdk.vmap.v1.Encoder.consume | ( | Iterator< Map.Entry< String, Object >> | data | ) |
Execute the consume phase of encoding with a default guess at the number of data elements.
data | An iterator over a map-like object which has all String keys. |
void com.vertica.sdk.vmap.v1.Encoder.consume | ( | Iterator< Map.Entry< String, Object >> | data, |
int | sizeEstimate | ||
) |
Execute the consume phase of encoding.
data | An iterator over a map-like object which has all String keys. |
sizeEstimate | A guess at the number of elements found in data. Iterators do not provide a means of querying size. |
ByteBuffer com.vertica.sdk.vmap.v1.Encoder.encode | ( | ) |
Get the encoded VMap as a new ByteBuffer.
void com.vertica.sdk.vmap.v1.Encoder.encode | ( | ByteBuffer | buffer | ) |
Write the VMap into a ByteBuffer and return the number of bytes written. The buffer's position will be advanced to the end of the VMap.
buffer | The target buffer, which must have at least byteSize() remaining, or a BufferOverflowException will result. |
String com.vertica.sdk.vmap.v1.Encoder.keyForIdent | ( | String | ident | ) |
Returns the key name of the first key that matches ident
according to identifier comparison. Requires that data already be consumed.
Implements com.vertica.sdk.vmap.v1.KeySelector.